Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: Retrieve bonding options differing from defaults
......................................................................
Patch Set 32: Code-Review-1
(4 comments)
http://gerrit.ovirt.org/#/c/24456/32/tests/functional/networkTests.py
File tests/functional/networkTests.py:
Line 1043:
Line 1044: self.assertNetworkExists(NETWORK_NAME, bridged=bridged)
Line 1045: self.assertBondExists(BONDING_NAME, nics)
Line 1046:
Line 1047: # Reduce bond size and create Network on detached NIC
please avoid whitespace noise.
Line 1048:
Line 1049: with nonChangingOperstate(BONDING_NAME):
Line 1050: netName = NETWORK_NAME + '-2'
Line 1051: networks = {netName: dict(nic=nics[0],
http://gerrit.ovirt.org/#/c/24456/32/vdsm/network/configurators/__init__.py
File vdsm/network/configurators/__init__.py:
Line 151: else:
Line 152: self.configApplier.setIfaceMtu(iface.name, maxMtu)
Line 153: return maxMtu
Line 154:
Line 155: def _waitForBondUp(self, bond):
nothing in this function is specific to bond. it could be any iface for us to wait for.
Line 156: # TODO: avoid polling
Line 157: INTERVAL = 0.1
Line 158: for _ in range(50):
Line 159: if netinfo.operstate(bond) == netinfo.OPERSTATE_UP:
Line 152: self.configApplier.setIfaceMtu(iface.name, maxMtu)
Line 153: return maxMtu
Line 154:
Line 155: def _waitForBondUp(self, bond):
Line 156: # TODO: avoid polling
indeed. the easiest way to do this is
mon = ipwrapper.Monitor()
mon.start()
to fire a new thread, that does
for event in mon:
if iface is up:
return
and in this function, join() on that thread with a timeout.
This new function is better split to another patch, with its own test, and should be
placed in ipwrapper.
Line 157: INTERVAL = 0.1
Line 158: for _ in range(50):
Line 159: if netinfo.operstate(bond) == netinfo.OPERSTATE_UP:
Line 160: return
http://gerrit.ovirt.org/#/c/24456/32/vdsm/sudoers.vdsm.in
File vdsm/sudoers.vdsm.in:
Line 1: Cmnd_Alias VDSM_LIFECYCLE = \
Line 2: @DMIDECODE_PATH@, \
Line 3: @TEE_PATH@ /sys/class/net/bonding_masters, \
Line 4: @TEE_PATH@ /sys/class/net/*/bonding/mode, \
Would you place that under a new Cmnd_Alias called VDSM_NETWORK ?
Line 5: @VDSMDIR@/mk_sysprep_floppy, \
Line 6: @SERVICE_PATH@ ksmtuned *, \
Line 7: @SERVICE_PATH@ ksm *
Line 8: Cmnd_Alias VDSM_STORAGE = @MOUNT_PATH@, @UMOUNT_PATH@, \
--
To view, visit
http://gerrit.ovirt.org/24456
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ief6d366b1b761627c7203cf236b75ef538af3e26
Gerrit-PatchSet: 32
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes