Change in vdsm[master]: networkTests: stop NetworkManager from managing ifaces using...

osvoboda at redhat.com osvoboda at redhat.com
Sat Feb 7 00:14:06 UTC 2015


Ondřej Svoboda has posted comments on this change.

Change subject: networkTests: stop NetworkManager from managing ifaces using NM_CONTROLLED=no
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.ovirt.org/#/c/37037/3/tests/functional/networkmanager.py
File tests/functional/networkmanager.py:

Line 49:         ifcfg.write('DEVICE={0}\n'
Line 50:                     'NM_CONTROLLED=no\n'.format(iface))
Line 51:     rc, _, _ = execCmd([_NM_CLI_BINARY.cmd, 'conn', 'load', ifcfg_path])
Line 52:     if rc:
Line 53:         raise SkipTest('Failed to unmanage ' + iface)
> please include out and err to make the debgger life easier.
Done
Line 54: 
Line 55: 
Line 56: def _restore(iface):
Line 57:     ifcfg_path = netinfo.NET_CONF_PREF + iface


Line 54: 
Line 55: 
Line 56: def _restore(iface):
Line 57:     ifcfg_path = netinfo.NET_CONF_PREF + iface
Line 58:     execCmd([_NM_CLI_BINARY.cmd, 'conn', 'delete', iface])
> check rc and write out/err to log in case of error.
Okay. Actually I am not sure if this 'connection' really needs to/can be removed (as it is not 'proper') but this way we will notice.

And also not sure about the parameter to nm-cli because NM can name its connections arbitrarily. I wonder if it would accept the path to the ifcfg file, why not.


http://gerrit.ovirt.org/#/c/37037/3/tests/functional/veth.py
File tests/functional/veth.py:

Line 27: import networkmanager
Line 28: 
Line 29: 
Line 30: @contextmanager
Line 31: def create(prefix='veth_', max_length=15):
> Dan also suggested to keep the original semantics and separate functionalit
Not really. The context manager is the only one that makes sense here and I can't just split the creation to its own portion.
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: 3
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