Fix Neutron enable_*_agent* Hiera parameters
authorEmilien Macchi <emilien@redhat.com>
Thu, 7 Apr 2016 14:57:38 +0000 (10:57 -0400)
committerEmilien Macchi <emilien@redhat.com>
Thu, 14 Apr 2016 18:53:57 +0000 (18:53 +0000)
This change will fix a logic error when L3 agent was disabled, where
a Pacemaker constraint (neutron-dhcp-agent-to-l3-agent-constraint) were
still looking for l3_agent_service in the Puppet catalog, but could not
because L3 agent was disabled.
It was sending this Puppet error:
Error: Could not find dependency
Pacemaker::Resource::Service[neutron-l3-agent] for
Pacemaker::Constraint::Base[neutron-dhcp-agent-to-l3-agent-constraint]

Change-Id: I0e5d24d844810c58a3205303399d1c20773af3dd

puppet/manifests/overcloud_controller_pacemaker.pp

index f152a14..53afc08 100644 (file)
@@ -1351,7 +1351,7 @@ if hiera('step') >= 5 {
                     Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
       }
     }
-    if hiera('neutron::enable_dhcp_agent',true) and hiera('l3_agent_service',true) {
+    if hiera('neutron::enable_dhcp_agent',true) and hiera('neutron::enable_l3_agent',true) {
       pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
         constraint_type => 'order',
         first_resource  => "${::neutron::params::dhcp_agent_service}-clone",