Change in vdsm[master]: net: if all devices are up, skip ifup during restoratrion.

ibarkan at redhat.com ibarkan at redhat.com
Sun Jul 12 08:05:06 UTC 2015


Ido Barkan has uploaded a new change for review.

Change subject: net: if all devices are up, skip ifup during restoratrion.
......................................................................

net: if all devices are up, skip ifup during restoratrion.

The usual case since 3.5.4 is that all devices ahve ONBOOT=yes and
are expected  to be up during restoration. But if only some of them
are down, it is better to be tedious and bring everything up with
the right order.

Change-Id: I9e97bea58be035e94ddd3a3a6c67132a2cbf1dc3
Signed-off-by: Ido Barkan <ibarkan at redhat.com>
---
M vdsm/vdsm-restore-net-config
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/43435/1

diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 2863507..fc16e78 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -133,7 +133,11 @@
     """
     for ifcfg_file in owned_ifcfg_files:
         _upgrade_onboot(ifcfg_file)
-    ifcfg.start_devices(owned_ifcfg_files)
+    down_links = _get_links_with_state_down(
+        [os.path.basename(name) for name in owned_ifcfg_files])
+    if down_links:
+        logging.debug("Some of the devices are down (%s).", down_links)
+        ifcfg.start_devices(owned_ifcfg_files)
 
 
 def _upgrade_onboot(ifcfg_file):


-- 
To view, visit https://gerrit.ovirt.org/43435
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e97bea58be035e94ddd3a3a6c67132a2cbf1dc3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>


More information about the vdsm-patches mailing list