]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
cobbler: break at the appropriate location in rc.local 408/head
authorDavid Galloway <dgallowa@redhat.com>
Wed, 5 Sep 2018 18:09:31 +0000 (14:09 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 5 Sep 2018 18:09:31 +0000 (14:09 -0400)
Before this change, if the first NIC on a machine had a link but wasn't
the uplinked NIC, the break would still get called and no NICs would be
left up.

Now we'll break only after we can ping the Cobbler host.

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/cobbler/templates/snippets/cephlab_rc_local

index b5b5b97a45a5b85029a07546b68a72a4b28c5aee..3f92e7b0316218657c789c5cf0d6dc7d50e3c796 100644 (file)
@@ -51,13 +51,15 @@ if [ ! -f /.cephlab_net_configured ]; then
         ifdown $nic
         rm -f /etc/sysconfig/network-scripts/ifcfg-$nic
         sed -i "/$nic/d" /etc/network/interfaces
+        # Go back to bailing if anything fails bringing the next NIC up
+        set -e
+      else
+        # We found our routable NIC!
+        # Write our lockfile so this only gets run on firstboot
+        touch /.cephlab_net_configured
+        # Break out of the loop once we've found our routable NIC
+        break
       fi
-      # Go back to bailing if anything fails bringing the next NIC up
-      set -e
-      # Write our lockfile so this only gets run on firstboot
-      touch /.cephlab_net_configured
-      # Break out of the loop once we've found our routable NIC
-      break
     else
       # Take the NIC back down if it's not connected
       ifconfig $nic down