Mark Wu has uploaded a new change for review.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Use 'ip link' to get different kinds of interfaces
It's a little faster than listing the dir '/sys/class/net'
Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com --- M tests/netinfoTests.py 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/13668/1
diff --git a/tests/netinfoTests.py b/tests/netinfoTests.py index 5e0716e..016d68a 100644 --- a/tests/netinfoTests.py +++ b/tests/netinfoTests.py @@ -43,12 +43,12 @@
def testSpeedInvalidNic(self): nicName = 'DUMMYNICDEVNAME' - self.assertTrue(nicName not in netinfo.nics()) + self.assertTrue(nicName not in netinfo.getInterfaces()[0]) s = netinfo.speed(nicName) self.assertEqual(s, 0)
def testSpeedInRange(self): - for d in netinfo.nics(): + for d in netinfo.getInterfaces()[0]: s = netinfo.speed(d) self.assertFalse(s < 0) self.assertTrue(s in ETHTOOL_SPEEDS or s == 0)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1841/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1892/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 1: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1841/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1892/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1842/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1893/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1842/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1893/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File lib/vdsm/netinfo.py Line 143 Line 144 Line 145 Line 146 Line 147 we only apply this function on nic, so it's unnecessary to validate it again.
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1844/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1895/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 3: (1 inline comment)
.................................................... File lib/vdsm/netinfo.py Line 143 Line 144 Line 145 Line 146 Line 147 we only apply this function on nic, so it's unnecessary to validate it again.
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 3: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1844/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1895/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1845/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1896/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1845/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1896/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 4: I would prefer that you didn't submit this
(3 inline comments)
.................................................... File lib/vdsm/netinfo.py Line 51: def _match_nic_name(nic, patterns): Line 52: return any(map(lambda p: fnmatch(nic, p), patterns)) Line 53: Line 54: Line 55: def _parseIpLinkOutput(links): could you add a unit test for this new function?
p.s. I bet it already exists in N+1 other projects... Line 56: interfaces = {'nic': [], 'bond': [], 'vlan': [], 'bridge': [], 'fake': []} Line 57: name = link = None Line 58: for line in links: Line 59: if re.match('^[0-9]+', line):
Line 80: fake_nics = config.get('vars', 'fake_nics').split(',') Line 81: ret, out, err = execCmd([constants.EXT_IPROUTE, '--details', Line 82: 'link', 'show']) Line 83: interfaces = _parseIpLinkOutput(out) Line 84: return ([nic for nic in interfaces['nic'] how about returning a named tuple? getInterfaces().nics is more readable than getInterfaces()[0]. Line 85: if not _match_nic_name(nic, hidden_nics)] + Line 86: [nic for nic in interfaces['fake'] Line 87: if _match_nic_name(nic, fake_nics)], Line 88: interfaces['bond'],
Line 156: # return the speed of devices that are capable of replying Line 157: try: Line 158: # operstat() filters out down/disabled nics Line 159: # virtio is a valid device, but doesn't support speed Line 160: if operstate(dev) == 'up' and not isvirtio(dev): nics() was added by http://gerrit.ovirt.org/4320 in intention to deparate non-existing devices from devices with no speed defined (such as vlan bonds and bridges)
Otherwise, we had annoying log entries.
The right solution for this is probably to make sure that we never call speed(bridge) or its like, and I prefer to do it in a separate patch. Line 161: # the device may have been disabled/downed after checking Line 162: # so we validate the return value as sysfs may return Line 163: # special values to indicate the device is down/disabled Line 164: s = int(file('/sys/class/net/%s/speed' % dev).read())
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1978/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1924/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 5: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1978/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1924/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1979/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1925/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 6:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1979/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1925/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 7:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1926/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 7:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1980/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 7:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1980/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1926/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 8:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1927/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 8:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1981/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 8:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1981/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1927/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 4: (3 inline comments)
.................................................... File lib/vdsm/netinfo.py Line 51: def _match_nic_name(nic, patterns): Line 52: return any(map(lambda p: fnmatch(nic, p), patterns)) Line 53: Line 54: Line 55: def _parseIpLinkOutput(links): Done Line 56: interfaces = {'nic': [], 'bond': [], 'vlan': [], 'bridge': [], 'fake': []} Line 57: name = link = None Line 58: for line in links: Line 59: if re.match('^[0-9]+', line):
Line 80: fake_nics = config.get('vars', 'fake_nics').split(',') Line 81: ret, out, err = execCmd([constants.EXT_IPROUTE, '--details', Line 82: 'link', 'show']) Line 83: interfaces = _parseIpLinkOutput(out) Line 84: return ([nic for nic in interfaces['nic'] Done Line 85: if not _match_nic_name(nic, hidden_nics)] + Line 86: [nic for nic in interfaces['fake'] Line 87: if _match_nic_name(nic, fake_nics)], Line 88: interfaces['bond'],
Line 156: # return the speed of devices that are capable of replying Line 157: try: Line 158: # operstat() filters out down/disabled nics Line 159: # virtio is a valid device, but doesn't support speed Line 160: if operstate(dev) == 'up' and not isvirtio(dev): Will fix it in a follow up patch. Thanks for helping me avoid a break. Line 161: # the device may have been disabled/downed after checking Line 162: # so we validate the return value as sysfs may return Line 163: # special values to indicate the device is down/disabled Line 164: s = int(file('/sys/class/net/%s/speed' % dev).read())
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 8: I would prefer that you didn't submit this
netinfo.nics() and netinfo.bondings() are still used by clientIF.py and deployUtil.py. Will fix the break in next patch
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 9:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1984/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 9:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1930/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 9: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1984/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1930/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 10:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1985/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 10:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1931/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 10:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1985/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1931/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 9: (2 inline comments)
Minor comments.
.................................................... File lib/vdsm/netinfo.py Line 64: name = match.group('name') Line 65: ifaceType = match.group('type') Line 66: link = match.group('link') Line 67: if ifaceType: Line 68: if ifaceType == 'tun' or ifaceType == 'dummy': This is nitpicking, but I would prefer the check to be more succinct like: if ifaceType in ('tun', 'dummy') Line 69: ifaceType = 'fake' Line 70: interfaces[ifaceType].append(name) Line 71: elif link == 'ether': Line 72: interfaces['nic'].append(name)
.................................................... File vdsm/neterrors.py Line 32: Line 33: ERR_FAILED_IPLINK = 50 Line 34: Line 35: Line 36: class FetchNetworkError(Exception): I think that it could potentially be used for more things in NetInfo. Maybe we could use a more general name for this Error. Something like: NetInfoFetchingError or NetInfoError.
But I'm not too adamant on this. Line 37: def __init__(self, errCode, message): Line 38: self.errCode = errCode Line 39: self.message = message
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 10: I would prefer that you didn't submit this
See my comments of the previous patch. They are very minor nitpicks. Just putting -1 for visibility.
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 11:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1932/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 11:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1988/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 9: (2 inline comments)
Thanks for the good comments!
.................................................... File lib/vdsm/netinfo.py Line 64: name = match.group('name') Line 65: ifaceType = match.group('type') Line 66: link = match.group('link') Line 67: if ifaceType: Line 68: if ifaceType == 'tun' or ifaceType == 'dummy': Done Line 69: ifaceType = 'fake' Line 70: interfaces[ifaceType].append(name) Line 71: elif link == 'ether': Line 72: interfaces['nic'].append(name)
.................................................... File vdsm/neterrors.py Line 32: Line 33: ERR_FAILED_IPLINK = 50 Line 34: Line 35: Line 36: class FetchNetworkError(Exception): Done Line 37: def __init__(self, errCode, message): Line 38: self.errCode = errCode Line 39: self.message = message
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 11: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 11:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1988/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1932/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 11: Verified
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 11: (4 inline comments)
thanks, Mark. I would love to see my comments implemented, and this change merged.
.................................................... File lib/vdsm/netinfo.py Line 49 Line 50 Line 51 Line 52 Line 53 would you please keep a (possibly slow) implementation of these functions?
def nics(): return getInterfaces().nics
as long as historical vds_bootstrap are still supported, there may be vds_bootstrap from ovirt-3.0 attempting to call nics().
Line 161: # return the speed of devices that are capable of replying Line 162: try: Line 163: # operstat() filters out down/disabled nics Line 164: # virtio is a valid device, but doesn't support speed Line 165: if operstate(dev) == 'up' and not isvirtio(dev): see my comment about the nics() function.
Please try to keep commits atomic, in the sense that the code after any single commit is valid. If you make no changes here, and keep calling the slow nics() mentioned above, you can still optimize in the following patch. Line 166: # the device may have been disabled/downed after checking Line 167: # so we validate the return value as sysfs may return Line 168: # special values to indicate the device is down/disabled Line 169: s = int(file('/sys/class/net/%s/speed' % dev).read())
.................................................... File vdsm/neterrors.py Line 29: ERR_USED_BRIDGE = 28 Line 30: ERR_FAILED_IFUP = 29 Line 31: ERR_LOST_CONNECTION = 10 # noConPeer Line 32: Line 33: ERR_FAILED_IPLINK = 50 do you expect clients to care about the such a specific detail? I do not, and I would like to avoid proliferation of error codes. I do not see how ERR_FAILED_IPLINK is more helpful to the client than a general "unexpected exception". Line 34: Line 35: Line 36: class NetInfoError(Exception): Line 37: def __init__(self, errCode, message):
.................................................... File vdsm_reg/deployUtil.py.in Line 979: bonding = '' Line 980: nic = None Line 981: Line 982: try: Line 983: _, bondings, vlans, _ = netinfo.getInterfaces() I'm not 100% sure, but if we try to add an ovirt-3.2 node to an ovirt-3.3 Engine, this line would explode (as there's no netinfo.getInterfaces in 3.2). Line 984: if mgtIface in vlans: Line 985: nic = netinfo.getVlanDevice(mgtIface) Line 986: vlan = netinfo.getVlanID(mgtIface) Line 987: else:
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 11: I would prefer that you didn't submit this
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 12:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2015/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 12:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1959/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 12:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2015/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1959/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 12: Verified
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 12: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 13:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2040/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 13:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1983/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 13:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2040/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1983/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 13: Looks good to me, but someone else must approve
Rebase, thus copying the previous score.
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 13: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Patch Set 13: Verified
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Use 'ip link' to get different kinds of interfaces ......................................................................
Use 'ip link' to get different kinds of interfaces
It's a little faster than listing the dir '/sys/class/net'
Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com --- M lib/vdsm/netinfo.py M tests/Makefile.am A tests/ip_details_link.out M tests/netinfoTests.py M vdsm.spec.in M vdsm/clientIF.py M vdsm/neterrors.py 7 files changed, 114 insertions(+), 28 deletions(-)
Approvals: Antoni Segura Puimedon: Looks good to me, but someone else must approve Mark Wu: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/13668 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org