diff options
Diffstat (limited to 'manifests/profile/pacemaker/neutron.pp')
-rw-r--r-- | manifests/profile/pacemaker/neutron.pp | 60 |
1 files changed, 42 insertions, 18 deletions
diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp index fff731d..6525126 100644 --- a/manifests/profile/pacemaker/neutron.pp +++ b/manifests/profile/pacemaker/neutron.pp @@ -18,22 +18,14 @@ # # === Parameters # -# [*step*] -# (Optional) The step in the deployment -# Defaults to hiera('step') -# -# [*pacemaker_master*] -# (Optional) The hostname of the pacemaker master -# Defaults to hiera('bootstrap_nodeid', undef) +# [*enable_dhcp*] +# (Optional) Whether to include the Neutron DHCP agent pacemaker profile +# Defaults to hiera('neutron::enable_dhcp_agent', false) # # [*enable_l3*] # (Optional) Whether to include the Neutron L3 agent pacemaker profile # Defaults to hiera('neutron::enable_l3_agent', false) # -# [*enable_dhcp*] -# (Optional) Whether to include the Neutron DHCP agent pacemaker profile -# Defaults to hiera('neutron::enable_dhcp_agent', false) -# # [*enable_metadata*] # (Optional) Whether to include the Neutron Metadata agent pacemaker profile # Defaults to hiera('neutron::enable_metadata_agent', false) @@ -42,16 +34,24 @@ # (Optional) Whether to include the Neutron OVS agent pacemaker profile # Defaults to hiera('neutron::enable_ovs_agent', false) # +# [*pacemaker_master*] +# (Optional) The hostname of the pacemaker master +# Defaults to hiera('bootstrap_nodeid', undef) +# +# [*step*] +# (Optional) The step in the deployment +# Defaults to hiera('step') +# class tripleo::profile::pacemaker::neutron ( - $step = hiera('step'), - $pacemaker_master = hiera('bootstrap_nodeid', undef), # We can drop the hiera defaults once the neutron roles are decomposed - $enable_l3 = hiera('neutron::enable_l3_agent', false), $enable_dhcp = hiera('neutron::enable_dhcp_agent', false), + $enable_l3 = hiera('neutron::enable_l3_agent', false), $enable_metadata = hiera('neutron::enable_metadata_agent', false), $enable_ovs = hiera('neutron::enable_ovs_agent', false), + #Don't drop below this line + $pacemaker_master = hiera('bootstrap_nodeid', undef), + $step = hiera('step'), ) { - Service <| tag == 'neutron-service' |> { @@ -61,9 +61,7 @@ class tripleo::profile::pacemaker::neutron ( stop => '/bin/true', } - class { '::tripleo::profile::base::neutron': - sync_db => ($::hostname == downcase($pacemaker_master)), - } + include ::tripleo::profile::base::neutron if $step >= 4 { include ::neutron::params @@ -183,5 +181,31 @@ class tripleo::profile::pacemaker::neutron ( Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]] } } + + #VSM + if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') { + pacemaker::resource::ocf { 'vsm-p' : + ocf_agent_name => 'heartbeat:VirtualDomain', + resource_params => 'force_stop=true config=/var/spool/cisco/vsm/vsm_primary_deploy.xml', + require => Class['n1k_vsm'], + meta_params => 'resource-stickiness=INFINITY', + } + if str2bool(hiera('n1k_vsm::pacemaker_control', true)) { + pacemaker::resource::ocf { 'vsm-s' : + ocf_agent_name => 'heartbeat:VirtualDomain', + resource_params => 'force_stop=true config=/var/spool/cisco/vsm/vsm_secondary_deploy.xml', + require => Class['n1k_vsm'], + meta_params => 'resource-stickiness=INFINITY', + } + pacemaker::constraint::colocation { 'vsm-colocation-contraint': + source => 'vsm-p', + target => 'vsm-s', + score => '-INFINITY', + require => [Pacemaker::Resource::Ocf['vsm-p'], + Pacemaker::Resource::Ocf['vsm-s']], + } + } + } + } } |