Make sure keepalived is restarted before haproxy.
authorSofer Athlan-Guyot <sathlang@redhat.com>
Mon, 31 Oct 2016 14:53:13 +0000 (15:53 +0100)
committerSofer Athlan-Guyot <sathlang@redhat.com>
Mon, 31 Oct 2016 18:25:11 +0000 (19:25 +0100)
When using SSL setup for undercloud, the admin and public vip required
for ssl binding by haproxy are created by keepalived.

This makes sure that keepalived is started before haproxy and thus that
the interfaces are indeed present.

This patch also ensures this is happening for overcloud ssl
configuration. The case where another load-balancing technology other
than haproxy is used is not covered.

Closes-Bug: #1638029

Change-Id: I98cb0dcd7f389a1dd38ec8324429bfef4979aa66

manifests/keepalived.pp

index c0fb3ef..515dcd0 100644 (file)
@@ -158,5 +158,8 @@ class tripleo::keepalived (
       priority     => 101,
     }
   }
-
+  # Make sure keepalive starts before haproxy.
+  if (defined(Class['::haproxy'])) {
+    Class['::keepalived::service'] -> Class['::haproxy']
+  }
 }