[node-patches] Change in ovirt-node[ovirt-3.5]: init: Restart networking early during boot

fabiand at redhat.com fabiand at redhat.com
Mon Jul 20 14:59:42 UTC 2015


Fabian Deutsch has uploaded a new change for review.

Change subject: init: Restart networking early during boot
......................................................................

init: Restart networking early during boot

Previously we were restarting networking quite late during the boot. The
reason to do this was that the restarting would also recognize the bind
mounted ifcfg files - which weren't available during the first start of
networking.
The key point here is that the network got restartde very late during
the boot process and could interfere with other services coming up.

Now we still do the restart, but much earlier, which should lead to fewer
collisions with other services.

Change-Id: I040f69d6df0a24a31f8057121029d04c172646da
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1240921
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-init-functions.sh.in
M services/ovirt-post.service
2 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/33/43833/1

diff --git a/scripts/ovirt-init-functions.sh.in b/scripts/ovirt-init-functions.sh.in
index bc2f83d..40e470e 100644
--- a/scripts/ovirt-init-functions.sh.in
+++ b/scripts/ovirt-init-functions.sh.in
@@ -870,14 +870,17 @@
         if [[ -e "/bin/systemctl" ]];
         then
             systemctl daemon-reload
-            mount -a
-            swapon -a
-            service auditd restart
         else
-            mount -a
-            swapon -a
+            # EL6
+            initctl reload-configuration
         fi
 
+        # A few services need to be restarted to pickup the newly bind-mounted
+        # config files (mounted in by the preceeding mount_config call)
+        mount -a
+        swapon -a
+        service network restart
+        service auditd restart
     fi
     log "Updating $OVIRT_DEFAULTS"
     tmpaug=$(mktemp)
@@ -1448,9 +1451,6 @@
 
         # Hack to fix rhbz#844997
         mount --make-rshared /
-
-        # Small hack to fix https://bugzilla.redhat.com/show_bug.cgi?id=805313
-        service network restart 2>/dev/null
 
         # Restarting netconsole, now that the network is up, rhbz#869984
         [[ -f "/config/etc/sysconfig/netconsole" &&
diff --git a/services/ovirt-post.service b/services/ovirt-post.service
index cf66e81..ccc799b 100644
--- a/services/ovirt-post.service
+++ b/services/ovirt-post.service
@@ -2,7 +2,7 @@
 Description=oVirt Node post configuration service
 After=ovirt.service ovirt-firstboot.service
 Wants=ovirt.service
-Before=getty at tty1.service vdsmd.service supervdsmd.service sanlock.service
+Before=getty at tty1.service vdsmd.service supervdsmd.service vdsm-network.service sanlock.service
 
 [Service]
 Type=oneshot


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I040f69d6df0a24a31f8057121029d04c172646da
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list