summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrent Eagles <beagles@redhat.com>2016-11-22 17:18:45 -0330
committerBrent Eagles <beagles@redhat.com>2016-11-23 14:43:27 -0330
commit476b05442817263d90e8c54a9b79cd0a8625862c (patch)
tree3eeb0329793eaf9c7ee3f0f788143221d4176476
parent8659269164dd4ada6230ec39df0da55dcaa221dd (diff)
Run os-net-config before restarting cluster on update
Running os-net-config before restarting the cluster prevents changes to the interface files caused by changes to implementation from bouncing network interfaces after the cluster has restarted. Closes-Bug: #1644138 Change-Id: I65fb104465ff3d37ddc791634302994334136014
-rwxr-xr-xextraconfig/tasks/yum_update.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
index c61f67a1..8a88ee64 100755
--- a/extraconfig/tasks/yum_update.sh
+++ b/extraconfig/tasks/yum_update.sh
@@ -103,6 +103,17 @@ return_code=$?
echo "$result"
echo "yum return code: $return_code"
+# Writes any changes caused by alterations to os-net-config and bounces the
+# interfaces *before* restarting the cluster.
+os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
+RETVAL=$?
+if [[ $RETVAL == 2 ]]; then
+ echo "os-net-config: interface configuration files updated successfully"
+elif [[ $RETVAL != 0 ]]; then
+ echo "ERROR: os-net-config configuration failed"
+ exit $RETVAL
+fi
+
if [[ "$pacemaker_status" == "active" ]] ; then
echo "Starting cluster node"
pcs cluster start