Antoni Segura Puimedon has posted comments on this change.

Change subject: Don't fail silently when ifup fails.
......................................................................


Patch Set 7: (4 inline comments)

....................................................
File vdsm/configNetwork.py
Line 72:             # In /etc/sysconfig/network-scripts/ifup* the last line 
usually
Line 73:             # contains the error reason.
Line 74:             raise ConfigNetworkError(ne.ERR_FAILED_IFUP, out[-1])
Line 75:         elif toCall is not None:
Line 76:             toCall()
So you prefer that we create a libvirt network for a network that may or may 
not turn out to exist after a while? (dhcp errors can happen and so on).

I guess it could be later removed by netinfo...
Line 77:         return rc, out, err
Line 78: 
Line 79:     if async:
Line 80:         # wait for dhcp in another thread,


Line 934: 
Line 935:     nic = nics[0] if nics else None
Line 936:     iface = bonding or nic
Line 937:     blockingDhcp = utils.tobool(options.get('blockingdhcp'))
Line 938:     async = options.get('bootproto') == 'dhcp' and not blockingDhcp
In any case it has to happen before line 947, because 957 unsets it.
Line 939: 
Line 940:     # take down nics that need to be changed
Line 941:     vlanedIfaces = [v['iface'] for v in _netinfo.vlans.values()]
Line 942:     if bonding not in vlanedIfaces:


Line 1013:         ifup(iface, vlanBootproto == 'dhcp' and not blockingDhcp,
Line 1014:              libvirtNetworkCreation)
Line 1015: 
Line 1016:     if bridged:
Line 1017:         ifup(network, bridgeBootproto == 'dhcp' and not blockingDhcp,
Right, I forgot to add:

if rc != 0:
    raise ConfigNetworkError(ne.ERR_FAILED_IFUP, out[-1])

Between lines 87 and 88.
Line 1018:              libvirtNetworkCreation)
Line 1019: 
Line 1020:     # add libvirt network
Line 1021:     if not async:


....................................................
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'll put 29 then.


--
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: 7
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]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to