Change in vdsm[master]: yajsonrpc: py3: stomp.py string/unicode compliance
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: yajsonrpc: py3: stomp.py string/unicode compliance
......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
--
To view, visit https://gerrit.ovirt.org/63212
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic77ee8120e85435a93e54bf16e9192d53bd48fc0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <leon.otium(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: removing leftover whitespace (48d5e8)
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: removing leftover whitespace (48d5e8)
......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
--
To view, visit https://gerrit.ovirt.org/63193
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2d41040c82937f9691203c98cf83127a1223d5fa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <leon.otium(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: removing leftover whitespace (48d5e8)
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: removing leftover whitespace (48d5e8)
......................................................................
Patch Set 1: Code-Review-1
I suspect you'd want to abandon this change, and instead post another patchset to https://gerrit.ovirt.org/#/c/63192
We need no more than one active change from you on this subject.
--
To view, visit https://gerrit.ovirt.org/63193
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2d41040c82937f9691203c98cf83127a1223d5fa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <leon.otium(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: tests: py3: decode byte string before checking for equality ...
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: tests: py3: decode byte string before checking for equality to string literal
......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
--
To view, visit https://gerrit.ovirt.org/63194
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide782514cebbfbbeed112ec4ceef597614e6cbb7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <leon.otium(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: removing leftover whitespace (48d5e8)
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: removing leftover whitespace (48d5e8)
......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
--
To view, visit https://gerrit.ovirt.org/63193
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2d41040c82937f9691203c98cf83127a1223d5fa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <leon.otium(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: misc.py py3 compliance via six
by automation@ovirt.org
gerrit-hooks has posted comments on this change.
Change subject: misc.py py3 compliance via six
......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
--
To view, visit https://gerrit.ovirt.org/63192
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I151c627efd0836bc6ffdf1d4126f504cf378a68c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <leon.otium(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: py3: make conf_persistence_test
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: py3: make conf_persistence_test
......................................................................
py3: make conf_persistence_test
In Python 3, an exception is not iterable, though its args are.
Change-Id: I330bd494be78bd9a78db5ac65b1a350df26b8911
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/Makefile.am
M tests/network/conf_persistence_test.py
2 files changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/62772/1
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 607c1de..2dce548 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -192,7 +192,6 @@
momTests.py \
monkeypatchTests.py \
mountTests.py \
- network/conf_persistence_test.py \
network/conf_test.py \
network/hook_ovs_test.py \
network/iproute2_test.py \
diff --git a/tests/network/conf_persistence_test.py b/tests/network/conf_persistence_test.py
index a55f96f..5981d4c 100644
--- a/tests/network/conf_persistence_test.py
+++ b/tests/network/conf_persistence_test.py
@@ -158,8 +158,7 @@
with Transaction(config=self.config) as _config:
_config.setNetwork(NETWORK, NETWORK_ATTRIBUTES)
raise TestException()
-
- diff, ex_type, _ = roi.exception
+ diff, ex_type, _ = roi.exception.args
self.assertEquals(diff.networks[NETWORK], {'remove': True})
self.assertEquals(ex_type, TestException)
file_path = os.path.join(self.tempdir, 'nets', NETWORK)
--
To view, visit https://gerrit.ovirt.org/62772
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I330bd494be78bd9a78db5ac65b1a350df26b8911
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: py3: define __nonzero__ by means of __bool__
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: py3: define __nonzero__ by means of __bool__
......................................................................
py3: define __nonzero__ by means of __bool__
Python 3 has renamed __nonzero__ to __bool__. As long as we support both
language flavours, we should have both methods defined.
https://docs.python.org/3/library/2to3.html?highlight=__nonzero__#2to3fix...
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Change-Id: I96beb2c794490def4ed904edd1c52ac2eb7b09a5
---
M lib/vdsm/network/ip/address.py
M lib/vdsm/network/netconfpersistence.py
M lib/vdsm/virt/utils.py
3 files changed, 16 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/62771/1
diff --git a/lib/vdsm/network/ip/address.py b/lib/vdsm/network/ip/address.py
index 0842eb4..35f3eaa 100644
--- a/lib/vdsm/network/ip/address.py
+++ b/lib/vdsm/network/ip/address.py
@@ -57,8 +57,11 @@
self.defaultRoute = defaultRoute
self.bootproto = bootproto
- def __nonzero__(self):
+ def __bool__(self):
return bool(self.address or self.bootproto)
+
+ def __nonzero__(self): # TODO: drop when py2 is no longer needed
+ return self.__bool__()
def __repr__(self):
return 'IPv4(%s, %s, %s, %s, %s)' % (self.address, self.netmask,
@@ -115,9 +118,12 @@
self.ipv6autoconf = ipv6autoconf
self.dhcpv6 = dhcpv6
- def __nonzero__(self):
+ def __bool__(self):
return bool(self.address or self.ipv6autoconf or self.dhcpv6)
+ def __nonzero__(self): # TODO: drop when py2 is no longer needed
+ return self.__bool__()
+
def __repr__(self):
return 'IPv6(%s, %s, %s, %s, %s)' % (
self.address, self.gateway, self.defaultRoute, self.ipv6autoconf,
diff --git a/lib/vdsm/network/netconfpersistence.py b/lib/vdsm/network/netconfpersistence.py
index 46d831a..37b9e89 100644
--- a/lib/vdsm/network/netconfpersistence.py
+++ b/lib/vdsm/network/netconfpersistence.py
@@ -89,9 +89,12 @@
return '%s(%s, %s)' % (self.__class__.__name__, self.networks,
self.bonds)
- def __nonzero__(self):
+ def __bool__(self):
return True if self.networks or self.bonds else False
+ def __nonzero__(self): # TODO: drop when py2 is no longer needed
+ return self.__bool__()
+
@staticmethod
def _confDictDiff(lhs, rhs):
result = {}
diff --git a/lib/vdsm/virt/utils.py b/lib/vdsm/virt/utils.py
index 9d54f7d..ed79111 100644
--- a/lib/vdsm/virt/utils.py
+++ b/lib/vdsm/virt/utils.py
@@ -88,7 +88,7 @@
with self._lock:
del self._items[key]
- def __nonzero__(self):
+ def __bool__(self):
now = self._clock()
with self._lock:
expired_keys = [
@@ -100,6 +100,9 @@
return bool(self._items)
+ def __nonzero__(self): # TODO: drop when py2 is no longer needed
+ return self.__bool__()
+
# private
def _get_live(self, key):
--
To view, visit https://gerrit.ovirt.org/62771
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I96beb2c794490def4ed904edd1c52ac2eb7b09a5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: net: Introduce waitfor_link method and use it in iface module
by edwardh@redhat.com
Edward Haas has uploaded a new change for review.
Change subject: net: Introduce waitfor_link method and use it in iface module
......................................................................
net: Introduce waitfor_link method and use it in iface module
Change-Id: I3808ef0b6dc086ad2770524f60c0d54b101d3383
Signed-off-by: Edward Haas <edwardh(a)redhat.com>
---
M lib/vdsm/network/link/iface.py
M lib/vdsm/network/netlink/waitfor.py
2 files changed, 29 insertions(+), 14 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/63042/1
diff --git a/lib/vdsm/network/link/iface.py b/lib/vdsm/network/link/iface.py
index b345ed7..9769f16 100644
--- a/lib/vdsm/network/link/iface.py
+++ b/lib/vdsm/network/link/iface.py
@@ -18,11 +18,9 @@
#
from __future__ import absolute_import
-import logging
-
from vdsm.network import ipwrapper
from vdsm.network.netlink import link
-from vdsm.network.netlink.monitor import Monitor
+from vdsm.network.netlink.waitfor import waitfor_linkup
STATE_UP = 'up'
@@ -64,13 +62,5 @@
def _up_blocking(dev, link_blocking):
- iface_up_check = is_link_up if link_blocking else is_up
- with Monitor(groups=('link',), timeout=2, silent_timeout=True) as mon:
+ with waitfor_linkup(dev, link_blocking):
ipwrapper.linkSet(dev, [STATE_UP])
- if iface_up_check(dev):
- return
- mon_device = (e for e in mon if e.get('name') == dev)
- for event in mon_device:
- logging.info('Monitor event: %s', event)
- if link.is_link_up(event.get('flags', 0), link_blocking):
- return
diff --git a/lib/vdsm/network/netlink/waitfor.py b/lib/vdsm/network/netlink/waitfor.py
index 2b8a138..ad5f247 100644
--- a/lib/vdsm/network/netlink/waitfor.py
+++ b/lib/vdsm/network/netlink/waitfor.py
@@ -22,7 +22,23 @@
from contextlib import contextmanager
import logging
+from . import link
from . import monitor
+
+
+@contextmanager
+def waitfor_linkup(iface, link_blocking=True, timeout=10):
+ iface_up_check = _is_link_up if link_blocking else _is_admin_up
+ with monitor.Monitor(groups=('link',), timeout=timeout,
+ silent_timeout=True) as mon:
+ try:
+ yield
+ finally:
+ if iface_up_check(iface):
+ return
+ for event in (e for e in mon if e.get('name') == iface):
+ if link.is_link_up(event.get('flags', 0), link_blocking):
+ return
@contextmanager
@@ -55,8 +71,9 @@
except monitor.MonitorError as e:
if e[0] == monitor.E_TIMEOUT:
logging.warning('Expected event "%s" of interface "%s" '
- 'was not caught within the given timeout. '
- 'Caught events: %s', expected_event, iface,
+ 'was not caught within %ssec. '
+ 'Caught events: %s',
+ expected_event, iface, timeout,
caught_events)
else:
raise
@@ -65,3 +82,11 @@
def _is_subdict(subdict, superdict):
return all(item in frozenset(superdict.items())
for item in frozenset(subdict.items()))
+
+
+def _is_admin_up(iface):
+ return link.is_link_up(link.get_link(iface)['flags'], check_link=False)
+
+
+def _is_link_up(iface):
+ return link.is_link_up(link.get_link(iface)['flags'], check_link=True)
--
To view, visit https://gerrit.ovirt.org/63042
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3808ef0b6dc086ad2770524f60c0d54b101d3383
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: hsm: add getVGInfo discard related fields
by ishaby@redhat.com
Idan Shaby has uploaded a new change for review.
Change subject: hsm: add getVGInfo discard related fields
......................................................................
hsm: add getVGInfo discard related fields
Patch I7ff47 added the fields discard_max_bytes and discard_zeroes_data
to getDeviceList.
This patch adds them also to getVGInfo.
Change-Id: I3cdb535923f6f5ffc961750271e8cde823ed835a
Signed-off-by: Idan Shaby <ishaby(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/62800/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index d622ffc..0f4932a 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2807,6 +2807,8 @@
info["vgUUID"] = str(pv.vg_uuid)
info["pvUUID"] = str(pv.uuid)
info["GUID"] = str(pv.guid)
+ info["discard_max_bytes"] = devInfo["discard_max_bytes"]
+ info["discard_zeroes_data"] = devInfo["discard_zeroes_data"]
return info
@deprecated
--
To view, visit https://gerrit.ovirt.org/62800
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cdb535923f6f5ffc961750271e8cde823ed835a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby(a)redhat.com>
7 years, 9 months