Petr Horáček has uploaded a new change for review. Change subject: net: retry ifup if an error occured ......................................................................
net: retry ifup if an error occured In case of failed ifup, try it again after a second. This problem should be resolved with systemd v220. This code is meant to be just a proof of our suspicion. If this does not solve the problem on test server, remove it. Change-Id: I90650d027d03b494673544d6d8cab7b381ddc917 Signed-off-by: Petr Horáček <[email protected]> Bug-Url: https://bugzilla.redhat.com/1259468 --- M vdsm/network/configurators/ifcfg.py 1 file changed, 13 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/47327/1 diff --git a/vdsm/network/configurators/ifcfg.py b/vdsm/network/configurators/ifcfg.py index c2b0345..cae3f97 100644 --- a/vdsm/network/configurators/ifcfg.py +++ b/vdsm/network/configurators/ifcfg.py @@ -19,6 +19,7 @@ from __future__ import absolute_import from contextlib import contextmanager +from time import sleep import copy import errno import glob @@ -803,9 +804,18 @@ rc, out, err = utils.execCmd(cmd, raw=False) if rc != 0: - # In /etc/sysconfig/network-scripts/ifup* the last line usually - # contains the error reason. - raise ConfigNetworkError(ERR_FAILED_IFUP, out[-1] if out else '') + # BZ: 1259468, In case of failed ifup, try it again after a second. + # This problem should be resolved with systemd v220. This code is meant + # to be just a proof of our suspicion. If this does not solve the + # problem on test server, remove it. + # NOTE: should we report the first or second error? + sleep(1) + rc2, _, _ = utils.execCmd(cmd, raw=False) + + if rc2 != 0: + # In /etc/sysconfig/network-scripts/ifup* the last line usually + # contains the error reason. + raise ConfigNetworkError(ERR_FAILED_IFUP, out[-1] if out else '') def _ifup(iface, cgroup=dhclient.DHCLIENT_CGROUP): -- To view, visit https://gerrit.ovirt.org/47327 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90650d027d03b494673544d6d8cab7b381ddc917 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
