Nir Soffer has posted comments on this change.
Change subject: json-rpc: Protocol detection
......................................................................
Patch Set 34:
This Jenkins error:
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8816/console
Is already solved in master and not related to this patch.
--
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 34
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
Dan Kenigsberg has uploaded a new change for review.
Change subject: pyflakes: use #noqa instead of invented hack
......................................................................
pyflakes: use #noqa instead of invented hack
Older versions of pyflakes complain about list comprehension hiding
other variables. Setting #noqa on the relevant lines should silence this
problem.
Change-Id: Ie0c2f147d04dccf2cbe0921bb23a8c6a98d7b989
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M Makefile.am
M vdsm/network/sourceroute.py
M vdsm/storage/lvm.py
3 files changed, 5 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/28446/1
diff --git a/Makefile.am b/Makefile.am
index dde8651..af88b30 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -76,14 +76,10 @@
$(NULL)
-SKIP_PYFLAKES_ERR = "\./vdsm/storage/lvm\.py.*: list comprehension redefines \
- 'lv' from line .*"
-
check-local:
+ python -c 'import pyflakes; print "pyflakes", pyflakes.__version__'
find . -path './.git' -prune -type f -o \
- -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \
- grep -w -v $(SKIP_PYFLAKES_ERR) | \
- while read LINE; do echo "$$LINE"; false; done
+ -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES)
$(PEP8) --version
for x in $(PEP8_BLACKLIST); do \
exclude="$${exclude},$${x}" ; \
diff --git a/vdsm/network/sourceroute.py b/vdsm/network/sourceroute.py
index 29093e1..bb3287e 100644
--- a/vdsm/network/sourceroute.py
+++ b/vdsm/network/sourceroute.py
@@ -150,7 +150,7 @@
allRules.append(rule)
# Find the rule we put in place with 'device' as its 'srcDevice'
- rules = [rule for rule in allRules if rule.srcDevice == device]
+ rules = [rule for rule in allRules if rule.srcDevice == device] # noqa
if not rules:
logging.error("Routing rules not found for device %s", device)
@@ -161,7 +161,7 @@
# Find the other rule we put in place - It'll have 'network' as
# its source
- rules += [rule for rule in allRules if rule.source == network]
+ rules += [rule for rule in allRules if rule.source == network] # noqa
return rules
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index 86edf55..b7789d9 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -612,7 +612,7 @@
else:
lvs = dict(self._lvs)
# lvs = self._reloadlvs()
- lvs = [lv for lv in lvs.values()
+ lvs = [lv for lv in lvs.values() # noqa
if not isinstance(lv, Stub) and (lv.vg_name == vgName)]
res = lvs
return res
--
To view, visit http://gerrit.ovirt.org/28446
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0c2f147d04dccf2cbe0921bb23a8c6a98d7b989
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: upgrade_unified: fix for nicless and bridges with vnics
......................................................................
upgrade_unified: fix for nicless and bridges with vnics
The upgrade script had a mistake when dealing with bridged networks
that made it not consider bridgeless networks nor bridges that had
vnics on them.
This bug would have made that a bridge with nic eth2 and several
vnics would have setup a network targetting:
'eth2vnet0vnet1'
Change-Id: I979ad260e86865fc7ca9760d58765e4bf0c14c3c
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M lib/vdsm/tool/unified_persistence.py
1 file changed, 15 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/28354/1
diff --git a/lib/vdsm/tool/unified_persistence.py b/lib/vdsm/tool/unified_persistence.py
index 46bf8e2..d4222e6 100644
--- a/lib/vdsm/tool/unified_persistence.py
+++ b/lib/vdsm/tool/unified_persistence.py
@@ -64,10 +64,20 @@
networks[network]['bridged'] = netParams['bridged']
# Determine devices: nic/bond -> vlan -> bridge
- physicalDevice = "".join(netParams['ports']) if \
- netParams.get('ports') else netParams.get('interface')
- topLevelDevice = netParams['iface'] if \
- netParams['bridged'] else physicalDevice
+ topLevelDevice = netParams['iface']
+ if netParams['bridged']:
+ devices = (netinfo.nics.keys() + netinfo.vlans.keys() +
+ netinfo.bondings.keys())
+ nonVnicPorts = [dev for dev in netParams['ports'] if
+ dev in devices]
+ # A network should only ever have (at most) an underlying
+ # device hierarchy
+ if nonVnicPorts:
+ physicalDevice, = nonVnicPorts
+ else:
+ physicalDevice = None # vdsm allows nicless VM nets
+ else:
+ physicalDevice = topLevelDevice
# Copy ip addressing information
bootproto = str(getIfaceCfg(topLevelDevice).get('BOOTPROTO'))
@@ -96,7 +106,7 @@
# Is the physical device a bond or a nic?
if physicalDevice in netinfo.bondings:
networks[network]['bonding'] = physicalDevice
- else:
+ elif physicalDevice in netinfo.nics:
networks[network]['nic'] = physicalDevice
return networks
--
To view, visit http://gerrit.ovirt.org/28354
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I979ad260e86865fc7ca9760d58765e4bf0c14c3c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: _findLiveSnapshotSupport: do not assume that guest <features> exist
......................................................................
_findLiveSnapshotSupport: do not assume that guest <features> exist
Change-Id: I8e6d1ae6d020bedcfa8f2986fce628714e877765
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/caps.py
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/28349/1
diff --git a/vdsm/caps.py b/vdsm/caps.py
index c5458e6..a4caa13 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -191,8 +191,11 @@
None if libvirt does not report the live
snapshot support (as in version <= 1.2.2),
'''
- features = guest.getElementsByTagName('features')[0]
- for feature in features.childNodes:
+ features = guest.getElementsByTagName('features')
+ if not features:
+ return None
+
+ for feature in features[0].childNodes:
if feature.nodeName == 'disksnapshot':
value = feature.getAttribute('default')
if value.lower() == 'on':
--
To view, visit http://gerrit.ovirt.org/28349
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e6d1ae6d020bedcfa8f2986fce628714e877765
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Nir Soffer has posted comments on this change.
Change subject: json-rpc: Protocol detection
......................................................................
Patch Set 34: Code-Review+1
(1 comment)
I think it is ready now. Hopefully breaking to smaller patches will not break anything.
http://gerrit.ovirt.org/#/c/26300/34/vdsm/protocolDetector.py
File vdsm/protocolDetector.py:
Line 172: def _handle_connection_read(self, fd):
Line 173: _, client_socket = self._pending_connections[fd]
Line 174: try:
Line 175: data = client_socket.recv(self._required_size, socket.MSG_PEEK)
Line 176: if data is None:
A comment explain this unusual return value would be nice.
Line 177: return
Line 178: except socket.error as e:
Line 179: if e.errno not in (errno.EAGAIN, errno.EWOULDBLOCK):
Line 180: self.log.warning("Unable to read data")
--
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 34
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes