Antoni Segura Puimedon has uploaded a new change for review.
Change subject: [WIP] Don't fail silently when ifup fails. ......................................................................
[WIP] Don't fail silently when ifup fails.
Up until now we discarded ifup return codes and ignored the possible errors present in ifup stdout. Use this information to perform better error reporting.
Change-Id: I1cc9dcc0a6b55d36fc937e1d364bd9c256ecd70a Signed-off-by: Antoni S. Puimedon asegurap@redhat.com Bug-Url: https://bugzilla.redhat.com/856737 --- M vdsm/configNetwork.py M vdsm/neterrors.py 2 files changed, 28 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/8415/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index a114798..fb7cd94 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -29,6 +29,7 @@ from xml.sax.saxutils import escape import glob import shutil +from functools import partial
import libvirt import selinux @@ -60,15 +61,23 @@ return rc
-def ifup(iface, async=False): +def ifup(iface, async=False, final=None): "Bring up an interface" - _ifup = lambda netIf: execCmd([constants.EXT_IFUP, netIf], raw=True) + def _ifup(netIf, toCall=None): + rc, out, err = execCmd([constants.EXT_IFUP, netIf], raw=False) + + if rc != 0: + # In /etc/sysconfig/network-scripts/ifup* the last line usually + # contains the error reason. + raise ConfigNetworkError(ne.ERR_FAILED_IFUP, out[-1]) + elif toCall is not None: + toCall()
if async: # wait for dhcp in another thread, # so vdsm won't get stuck (BZ#498940) t = threading.Thread(target=_ifup, name='ifup-waiting-on-dhcp', - args=(iface,)) + args=(iface, final)) t.daemon = True t.start() else: @@ -899,6 +908,11 @@ nic = nics[0] if nics else None iface = bonding or nic blockingDhcp = utils.tobool(options.get('blockingdhcp')) + # Asynchronous top level ifup creation variables. + async = options['bootproto'] and blockingDhcp + libvirtNetworkCreation = partial(configWriter.createLibvirtNetwork, + network, bridged, iface) +
# take down nics that need to be changed vlanedIfaces = [v['iface'] for v in _netinfo.vlans.values()] @@ -959,22 +973,27 @@
# Now we can run ifup for all interfaces if bonding: - ifup(bonding, bondBootproto == 'dhcp' and not blockingDhcp) + ifup(bonding, bondBootproto == 'dhcp' and not blockingDhcp, + libvirtNetworkCreation)
# NICs must be activated in the same order of boot time # to expose the correct MAC address. for nic in nicSort(nics): - ifup(nic, options['bootproto'] and not blockingDhcp) + ifup(nic, options['bootproto'] and not blockingDhcp, + libvirtNetworkCreation)
# Now we can ifup VLAN interface, because bond and nic already up if vlan: - ifup(iface, vlanBootproto == 'dhcp' and not blockingDhcp) + ifup(iface, vlanBootproto == 'dhcp' and not blockingDhcp, + libvirtNetworkCreation)
if bridged: - ifup(network, bridgeBootproto == 'dhcp' and not blockingDhcp) + ifup(network, bridgeBootproto == 'dhcp' and not blockingDhcp, + libvirtNetworkCreation)
# add libvirt network - configWriter.createLibvirtNetwork(network, bridged, iface) + if not async: + libvirtNetworkCreation()
def assertBridgeClean(bridge, vlan, bonding, nics): diff --git a/vdsm/neterrors.py b/vdsm/neterrors.py index 65e2674..92faa59 100644 --- a/vdsm/neterrors.py +++ b/vdsm/neterrors.py @@ -27,4 +27,5 @@ ERR_BAD_VLAN = 26 ERR_BAD_BRIDGE = 27 ERR_USED_BRIDGE = 28 +ERR_FAILED_IFUP = 30 ERR_LOST_CONNECTION = 10 # noConPeer
-- To view, visit http://gerrit.ovirt.org/8415 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I1cc9dcc0a6b55d36fc937e1d364bd9c256ecd70a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: [WIP] Don't fail silently when ifup fails. ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(3 inline comments)
.................................................... File vdsm/configNetwork.py Line 911: blockingDhcp = utils.tobool(options.get('blockingdhcp')) Line 912: # Asynchronous top level ifup creation variables. Line 913: async = options['bootproto'] and blockingDhcp Line 914: libvirtNetworkCreation = partial(configWriter.createLibvirtNetwork, Line 915: network, bridged, iface) iface still unknown here, it can be changed (line 952) Line 916: Line 917: Line 918: # take down nics that need to be changed Line 919: vlanedIfaces = [v['iface'] for v in _netinfo.vlans.values()]
Line 989: libvirtNetworkCreation) Line 990: Line 991: if bridged: Line 992: ifup(network, bridgeBootproto == 'dhcp' and not blockingDhcp, Line 993: libvirtNetworkCreation) why we need to call configWriter.createLibvirtNetwork several times? Am I missing something? Line 994: Line 995: # add libvirt network Line 996: if not async: Line 997: libvirtNetworkCreation()
Line 993: libvirtNetworkCreation) Line 994: Line 995: # add libvirt network Line 996: if not async: Line 997: libvirtNetworkCreation() Ah man, why it's too complicate? Line 998: Line 999: Line 1000: def assertBridgeClean(bridge, vlan, bonding, nics): Line 1001: brifs = os.listdir('/sys/class/net/%s/brif/' % bridge)
-- 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: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] Don't fail silently when ifup fails. ......................................................................
Patch Set 2: (3 inline comments)
.................................................... File vdsm/configNetwork.py Line 911: blockingDhcp = utils.tobool(options.get('blockingdhcp')) Line 912: # Asynchronous top level ifup creation variables. Line 913: async = options['bootproto'] and blockingDhcp Line 914: libvirtNetworkCreation = partial(configWriter.createLibvirtNetwork, Line 915: network, bridged, iface) Done Line 916: Line 917: Line 918: # take down nics that need to be changed Line 919: vlanedIfaces = [v['iface'] for v in _netinfo.vlans.values()]
Line 989: libvirtNetworkCreation) Line 990: Line 991: if bridged: Line 992: ifup(network, bridgeBootproto == 'dhcp' and not blockingDhcp, Line 993: libvirtNetworkCreation) Only the topmost device can have async set to True. Thus, _ifup will be called without the libvirtNetworkCreation for all except one. Line 994: Line 995: # add libvirt network Line 996: if not async: Line 997: libvirtNetworkCreation()
Line 993: libvirtNetworkCreation) Line 994: Line 995: # add libvirt network Line 996: if not async: Line 997: libvirtNetworkCreation() There might be a simpler way. It's just the first workable idea I had to cope with the issue of asynchronous problems with ifup. Line 998: Line 999: Line 1000: def assertBridgeClean(bridge, vlan, bonding, nics): Line 1001: brifs = os.listdir('/sys/class/net/%s/brif/' % bridge)
-- 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: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky 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: It's may be problematic now, since in your other patch you keep all free NICs as UP. The additional up will always back with rc=1 and we will raise exception. I am not sure whether this correct, but it definitely different behaviour. 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() why this dependency from async? I still don't like this, looks like big overhead to me. 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 what happened with 29 :)
-- 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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: [WIP] Don't fail silently when ifup fails. ......................................................................
Patch Set 3: I would prefer that you didn't submit this
-- 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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: [WIP] Don't fail silently when ifup fails. ......................................................................
Patch Set 6: Looks good to me, but someone else must approve
-- 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: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 7:
Dropped WIP from the patch name.
-- 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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com
Mark Wu has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 7: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/configNetwork.py Line 70: Line 71: if rc != 0: 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]) If my understanding is correct, the check still can't change the result returned to engine for the case of dhcp. So I think it doesn't resolve the problem thoroughly. Line 75: elif toCall is not None: Line 76: toCall() Line 77: return rc, out, err Line 78:
-- 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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 7: (1 inline comment)
.................................................... File vdsm/configNetwork.py Line 70: Line 71: if rc != 0: 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]) Your understanding is correct. However, there is no way asynchronous will be reported unless we do some pushing mode. However, I believe that with this change an error will be reported in the logs, the network will not be reported back to the engine neither will it be created in libvirt, fixing the recreation problem presented in the bug. Line 75: elif toCall is not None: Line 76: toCall() Line 77: return rc, out, err Line 78:
-- 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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 7: I would prefer that you didn't submit this
(4 inline comments)
I'd suggest to solve the synchronous use case, and try not to make the async case any worse. In a later patch, we can consider how the async case should be solved (I don't think we can do much about it :-( )
.................................................... 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() our async ifup is dangerous on its own right - we cannot tell if and when we'd receive an IP address. Adding a callback on top of this, to be called in an undeterministic timing, would only make it worse. I'd hate to see a libvirt network appearing out of the blue. 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 this is defined up here, and used so much down the road... 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, I do not think this patch would solve the cited bug: in the bug, we had a static IP given to the host, that had a collision with another host on the same LAN. static IP is set synchronously, where the rc is returned by ifup(), then ignored here. 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 if you go outside 20-29, you should update the comment in define.py
-- 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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
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 asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 8:
I made some fixes as noted by the reviewers. The complaints yet to address are:
- Remove the callback mechanism to avoid creating libvirt networks at an unpredictable time. # I replied my opinion to this: "I think it is better to avoid creating libvirt networks on interfaces that may not be created than it is to avoid having them created when and if the interfaces are successfully created.
- The check still can't change the result returned to engine for the case of dhcp. So I think it doesn't resolve the problem thoroughly. # I replied: there is no way asynchronous will be reported unless we do some pushing mode. However, I believe that with this change an error will be reported in the logs, the network will not be reported back to the engine (it could be improved by rolling back the part that was created if some was) neither will it be created in libvirt, fixing the recreation problem presented in the bug.
-- 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: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Igor Lvovsky has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 8: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/configNetwork.py Line 87: rc, out, err = _ifup(iface) Line 88: if rc != 0: Line 89: # In /etc/sysconfig/network-scripts/ifup* the last line usually Line 90: # contains the error reason. Line 91: raise ConfigNetworkError(ne.ERR_FAILED_IFUP, out[-1]) it's unnecessary because you already raise this in _ifup Line 92: return rc Line 93: Line 94: Line 95: def ifaceUsers(iface):
-- 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: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 9: (1 inline comment)
.................................................... File vdsm/configNetwork.py 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, @Dan I hadn't forgotten. With static ip, there is an exception if rc!=0. Codepath: line 1017->66->79->86->87->68->69->71->74 Line 1018: libvirtNetworkCreation) Line 1019: Line 1020: # add libvirt network Line 1021: if not async:
-- 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: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 9: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/configNetwork.py 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, oh, I've missed this fact. sorry. I knew that the async flow is too confusing.
Please postpone it to another patch - if to be ever solved. Line 1018: libvirtNetworkCreation) Line 1019: Line 1020: # add libvirt network Line 1021: if not async:
-- 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: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 9: (1 inline comment)
.................................................... File vdsm/configNetwork.py 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, Done Line 1018: libvirtNetworkCreation) Line 1019: Line 1020: # add libvirt network Line 1021: if not async:
-- 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: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 10: Looks good to me, approved
(1 inline comment)
.................................................... File vdsm/configNetwork.py Line 911: Line 912: # Validation Line 913: if not utils.tobool(force): Line 914: logging.debug('validating network...') Line 915: _addNetworkValidation( these kind of fixes serves mainly as a distraction to me. I prefer special cleanup-only patches such as http://gerrit.ovirt.org/9729 Line 916: _netinfo, network=network, vlan=vlan, bonding=bonding, nics=nics, Line 917: ipaddr=ipaddr, netmask=netmask, gateway=gateway, Line 918: bondingOptions=bondingOptions, bridged=bridged, **options) Line 919:
-- 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: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 10: (1 inline comment)
.................................................... File vdsm/configNetwork.py Line 911: Line 912: # Validation Line 913: if not utils.tobool(force): Line 914: logging.debug('validating network...') Line 915: _addNetworkValidation( Sorry. flake8 was making me cringe so long that I finally gave in and changed it. For another time I'll make it into two patches. Line 916: _netinfo, network=network, vlan=vlan, bonding=bonding, nics=nics, Line 917: ipaddr=ipaddr, netmask=netmask, gateway=gateway, Line 918: bondingOptions=bondingOptions, bridged=bridged, **options) Line 919:
-- 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: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Igor Lvovsky has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 10: Verified; Looks good to me, but someone else must approve
-- 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: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Igor Lvovsky has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 10: I would prefer that you didn't submit this
Dan, Toni patch is good, but we can't take it because it raise the old bond issue [1] and will fail the ruth tests
[1] Bond's MAC addresses order:
Traceback (most recent call last): File "/usr/share/vdsm/supervdsmServer.py", line 77, in wrapper return func(*args, **kwargs) File "/usr/share/vdsm/supervdsmServer.py", line 163, in setupNetworks return configNetwork.setupNetworks(networks, bondings, **options) File "/usr/share/vdsm/configNetwork.py", line 1344, in setupNetworks _editBondings(bondings, configWriter) File "/usr/share/vdsm/configNetwork.py", line 1244, in _editBondings ifup(nic) File "/usr/share/vdsm/configNetwork.py", line 82, in ifup rc, out, err = _ifup(iface) File "/usr/share/vdsm/configNetwork.py", line 71, in _ifup raise ConfigNetworkError(ne.ERR_FAILED_IFUP, out[-1]) ConfigNetworkError: (29, 'Device eth3 has different MAC address than expected, ignoring.')
-- 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: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 11:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/351/ (2/2)
-- 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: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 11:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/385/ (1/2)
-- 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: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 11:
Rebased on the other changes so the bug reported by Igor doesn't happen anymore.
A patch for ifdown will follow when the initial bond0-4 ifdown issue is solved (so two patches, one to solve the ifdown, the other one to add the exception).
-- 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: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 11: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/351/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/385/ : FAILURE
-- 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: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 11:
The Dec 11th merge of has changed the behavior of restoreBackups and now the unit test for persistentBackup fails due to ifup failing.
I'll look into it.
-- 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: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 12:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/386/ (2/2)
-- 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: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 12:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/352/ (1/2)
-- 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: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 12:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/352/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/386/ : SUCCESS
-- 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: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 12: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File tests/configNetworkTests.py Line 354: with MonkeyPatchScope([ Line 355: (netinfo, 'NET_CONF_BACK_DIR', Line 356: os.path.join(self._tempdir, 'netback')), Line 357: (netinfo, 'NET_CONF_DIR', self._tempdir), Line 358: (configNetwork.ConfigWriter, '_stopAtomicDevices', lambda x: 0), I suppose this is because my "delicate network rollback" is not delicate enough - _stopAtomicDevices should not ifdown bond elements or nics with vlan.
Let's improve _sortModifiedIfcfgs() instead of skipping it. Line 359: (configNetwork.ConfigWriter, '_startAtomicDevices', lambda x: 0), Line 360: ]): Line 361: #after vdsm package is installed, the 'vdsm' account will be Line 362: #created if no 'vdsm' account, we should skip this test
-- 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: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 13:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/413/ (2/2)
-- 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: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 13:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/378/ (1/2)
-- 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: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 13: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/378/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/413/ : FAILURE
-- 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: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 14:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/379/ (1/2)
-- 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: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 14:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/414/ (2/2)
-- 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: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 14:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/379/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/414/ : SUCCESS
-- 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: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 15:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/421/ (1/2)
-- 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: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 15:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/386/ (2/2)
-- 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: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 15: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/386/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/421/ : FAILURE
-- 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: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 16:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/387/ (2/2)
-- 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: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 16:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/422/ (1/2)
-- 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: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 16:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/387/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/422/ : SUCCESS
-- 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: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 16: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/configNetwork.py Line 355: for dev in reversed(self._sortModifiedIfcfgs()): Line 356: ifdown(dev) Line 357: Line 358: def _startAtomicDevices(self): Line 359: for dev in self._sortModifiedIfcfgs(): we need to catch the new exception here, to keep our "best effort" semantics for the rollback operation. Line 360: ifup(dev) Line 361: Line 362: @classmethod Line 363: def _persistentBackup(cls, filename):
-- 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: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 17:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/498/ (1/2)
-- 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: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 17:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/463/ (2/2)
-- 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: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 17:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/463/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/498/ : SUCCESS
-- 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: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 17: Looks good to me, approved
-- 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: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Don't fail silently when ifup fails. ......................................................................
Don't fail silently when ifup fails.
Up until now we discarded ifup return codes and ignored the possible errors present in ifup stdout. Use this information to perform better error reporting.
The tests change is due to the fact that now that we treat ifup errors as excepcional occurences, for unit testing the persistent backups (thing which can be done by a regular user) we do not need to test ifup and ifdown of the current config as it is not a thing that the unprivileged user is normally allowed to do.
Change-Id: I1cc9dcc0a6b55d36fc937e1d364bd9c256ecd70a Signed-off-by: Antoni S. Puimedon asegurap@redhat.com Bug-Url: https://bugzilla.redhat.com/856737 --- M tests/configNetworkTests.py M vdsm/configNetwork.py M vdsm/neterrors.py 3 files changed, 17 insertions(+), 3 deletions(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/8415 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I1cc9dcc0a6b55d36fc937e1d364bd9c256ecd70a Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Don't fail silently when ifup fails. ......................................................................
Patch Set 17: Verified
verified on el6.
-- 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: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org