Change in vdsm[master]: networkTests: stop NetworkManager from managing devices usin...
danken at redhat.com
danken at redhat.com
Tue Feb 17 10:22:21 UTC 2015
Dan Kenigsberg has posted comments on this change.
Change subject: networkTests: stop NetworkManager from managing devices using NM_CONTROLLED=no
......................................................................
Patch Set 15: Code-Review-1
(4 comments)
http://gerrit.ovirt.org/#/c/37037/15/lib/vdsm/constants.py.in
File lib/vdsm/constants.py.in:
Line 131: EXT_MOUNT = '@MOUNT_PATH@'
Line 132: EXT_MULTIPATH = '@MULTIPATH_PATH@'
Line 133:
Line 134: EXT_NICE = '@NICE_PATH@'
Line 135: EXT_NMCLI = '@NMCLI_PATH@'
please use the more moder CommandPath construct instead of this constants junkyard.
Line 136:
Line 137: EXT_PGREP = '@PGREP_PATH@'
Line 138: EXT_PYTHON = '@PYTHON@'
Line 139:
http://gerrit.ovirt.org/#/c/37037/15/tests/functional/networkmanager.py
File tests/functional/networkmanager.py:
Line 36: for iface in ifaces:
Line 37: toggle_managed(iface, 'yes')
Line 38:
Line 39:
Line 40: def toggle_managed(iface, nm_controlled):
please pass nm_controlled as a boolean. document that this does nothing if NM is not found running.
Line 41: if pgrep('NetworkManager'):
Line 42: ifcfg_path = NET_CONF_PREF + iface
Line 43: with open(ifcfg_path, 'w') as ifcfg:
Line 44: ifcfg.write('DEVICE={0}\n'
Line 39:
Line 40: def toggle_managed(iface, nm_controlled):
Line 41: if pgrep('NetworkManager'):
Line 42: ifcfg_path = NET_CONF_PREF + iface
Line 43: with open(ifcfg_path, 'w') as ifcfg:
We must add a comment into the file, stating that it is intended to be temporary, just to mark the iface as non-managed.
Line 44: ifcfg.write('DEVICE={0}\n'
Line 45: 'NM_CONTROLLED={1}\n'.format(iface, nm_controlled))
Line 46: try:
Line 47: rc, out, err = execCmd([EXT_NMCLI, 'conn', 'load', ifcfg_path])
http://gerrit.ovirt.org/#/c/37037/15/tests/functional/veth.py
File tests/functional/veth.py:
Line 27: import networkmanager
Line 28:
Line 29:
Line 30: @contextmanager
Line 31: def pair(prefix='veth_', max_length=15):
since nm patch is being stalled, please split the veth refactoring to its own patch.
Line 32: """
Line 33: Yield a pair of veth devices. This assumes root privileges (currently
Line 34: required by all tests anyway).
Line 35:
--
To view, visit http://gerrit.ovirt.org/37037
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icc8ea9e0b0d410203ed3045e735c9450eee316ae
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list