Only restart haproxy services when enable_load_balancer is defined
authorMichele Baldessari <michele@acksyn.org>
Tue, 25 Oct 2016 12:36:56 +0000 (14:36 +0200)
committerMichele Baldessari <michele@acksyn.org>
Tue, 25 Oct 2016 14:23:04 +0000 (16:23 +0200)
If we upgrade a cloud that was configured with external load balancer
the process will fail during convergence step because it will try to
restart haproxy which is not configured when an external load balancer
is configured.

Closes-Bug: #1636527

Change-Id: I6f6caec3e5c96e77437c1c83e625f39649a66c48

manifests/profile/pacemaker/haproxy.pp

index 21d8ab1..605bb15 100644 (file)
@@ -44,7 +44,7 @@ class tripleo::profile::pacemaker::haproxy (
     $pacemaker_master = false
   }
 
-  if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+  if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' and $enable_load_balancer {
     tripleo::pacemaker::resource_restart_flag { 'haproxy-clone':
       subscribe => Concat['/etc/haproxy/haproxy.cfg'],
     }