Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] Don't fail silently when ifup fails.
......................................................................
Patch Set 3: (3 inline comments)
....................................................
File vdsm/configNetwork.py
Line 65: "Bring up an interface"
Line 66: def _ifup(netIf, toCall=None):
Line 67: rc, out, err = execCmd([constants.EXT_IFUP, netIf], raw=False)
Line 68:
Line 69: if rc != 0:
I've been trying it on my computer and repeating ifup on an interface is
returning me rc=0 (although telling me "RTNETLINK answers: File exists" in
stderr).
Line 70: # In /etc/sysconfig/network-scripts/ifup* the last line
usually
Line 71: # contains the error reason.
Line 72: raise ConfigNetworkError(ne.ERR_FAILED_IFUP, out[-1])
Line 73: elif toCall is not None:
Line 992: libvirtNetworkCreation)
Line 993:
Line 994: # add libvirt network
Line 995: if not async:
Line 996: libvirtNetworkCreation()
This dependency is because this way we only create the network in libvirt in
case the ifup process has happened successfully in a synchronous way.
If we don't remove it:
Everything went well and the asynchronous top level ifup attempts to create
the libvirt network on a separate thread:
- It finds out that the main thread has already created the libvirt
network, getting a libvirtError exception.
One could argue this case is solved by just dropping the libvirt network
creation from the separate thread, but that only makes this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=861701
worse because:
If we remove it:
The network might be created on the main thread while the top level
interface has been unsuccessfully created on a separate thread.
Line 997:
Line 998:
Line 999: def assertBridgeClean(bridge, vlan, bonding, nics):
Line 1000: brifs = os.listdir('/sys/class/net/%s/brif/' % bridge)
....................................................
File vdsm/neterrors.py
Line 26: ERR_BAD_BONDING = 25
Line 27: ERR_BAD_VLAN = 26
Line 28: ERR_BAD_BRIDGE = 27
Line 29: ERR_USED_BRIDGE = 28
Line 30: ERR_FAILED_IFUP = 30
I thought that since there is a gap from 10 to 20 because there arguably they
are different classes of errors (former is an event and latter are
configuration errors), 30 could be with errors happening when errors happen
while ifupping, creating bond, bridge, etc.
--
To view, visit http://gerrit.ovirt.org/8415
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1cc9dcc0a6b55d36fc937e1d364bd9c256ecd70a
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches