Ondřej Svoboda has uploaded a new change for review.
Change subject: netinfo: 'interface' may be an empty element, so fix an existence test
......................................................................
netinfo: 'interface' may be an empty element, so fix an existence test
A network's interface was previously obtained by getElementsByTagName() which
returns a list. ElementTree's find(), however, returns the first element of
such a list (unlike findall() which is a counterpart of getElementsByTagName).
Since the 'interface' element may be empty and its boolean value is tied to
the number of its subelements we have to check against None this time,
otherwise 0 (the length) is interpreted as a negative condition.
An example of an empty 'interface':
<interface dev='bond11'/>
Change-Id: I54ad89e7ac307fc6bc7f48a45d00b0f3a177cd58
Signed-off-by: Ondřej Svoboda <osvoboda(a)redhat.com>
---
M lib/vdsm/netinfo.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/38294/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index 007f127..0e06503 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -115,7 +115,9 @@
nets[netname] = {}
xml = etree.fromstring(net.XMLDesc(0))
interfaces = xml.find('.//interface')
- if interfaces:
+ # len() called on an empty Element like "<interface dev='bond11'/>"
+ # returns 0 so we have to test against None
+ if interfaces is not None:
nets[netname]['iface'] = interfaces.get('dev')
nets[netname]['bridged'] = False
else:
--
To view, visit https://gerrit.ovirt.org/38294
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54ad89e7ac307fc6bc7f48a45d00b0f3a177cd58
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
automation(a)ovirt.org has posted comments on this change.
Change subject: storage: introducing vdsm-dump-chains script
......................................................................
Patch Set 3:
* 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.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/38281
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I428c443bb7d6b2a504a6f77efcd4838f7ae6c404
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
automation(a)ovirt.org has posted comments on this change.
Change subject: storage: introducing vdsm-dump-chains script
......................................................................
Patch Set 2:
* 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.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/38281
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I428c443bb7d6b2a504a6f77efcd4838f7ae6c404
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
Martin Betak has uploaded a new change for review.
Change subject: caps.py: Drop support for Fedora 19
......................................................................
caps.py: Drop support for Fedora 19
Change-Id: Ib1f89f3b8371b6d3f4ba8a4e17b454254213960d
Signed-off-by: Martin Betak <mbetak(a)redhat.com>
---
M vdsm/caps.py
1 file changed, 0 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/34191/1
diff --git a/vdsm/caps.py b/vdsm/caps.py
index cf4967b..c419bd7 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -722,13 +722,6 @@
@utils.memoized
def _getVersionInfo():
- if not hasattr(libvirt, 'VIR_MIGRATE_ABORT_ON_ERROR'):
- return _dropVersion('3.4',
- 'VIR_MIGRATE_ABORT_ON_ERROR not found in libvirt,'
- ' support for clusterLevel >= 3.4 is disabled.'
- ' For Fedora 19 users, please consider upgrading'
- ' libvirt from the virt-preview repository')
-
if not hasattr(libvirt, 'VIR_MIGRATE_AUTO_CONVERGE'):
return _dropVersion('3.6',
'VIR_MIGRATE_AUTO_CONVERGE not found in libvirt,'
--
To view, visit http://gerrit.ovirt.org/34191
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1f89f3b8371b6d3f4ba8a4e17b454254213960d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbetak(a)redhat.com>