diff --git a/manifests/pacemaker/haproxy_with_vip.pp b/manifests/pacemaker/haproxy_with_vip.pp index 0aabe7a1b..c3d1c3af9 100644 --- a/manifests/pacemaker/haproxy_with_vip.pp +++ b/manifests/pacemaker/haproxy_with_vip.pp @@ -40,6 +40,14 @@ # } # Defaults to undef # +# [*meta_params*] +# (optional) Additional meta parameters to pass to "pcs resource create" for the VIP +# Defaults to '' +# +# [*op_params*] +# (optional) Additional op parameters to pass to "pcs resource create" for the VIP +# Defaults to '' +# # [*pcs_tries*] # (Optional) The number of times pcs commands should be retried. # Defaults to 1 @@ -53,6 +61,8 @@ define tripleo::pacemaker::haproxy_with_vip( $vip_name, $ip_address, $location_rule = undef, + $meta_params = '', + $op_params = '', $pcs_tries = 1, $ensure = true) { @@ -83,8 +93,9 @@ define tripleo::pacemaker::haproxy_with_vip( cidr_netmask => $netmask, nic => $nic, ipv6_addrlabel => $ipv6_addrlabel, - meta_params => 'resource-stickiness=INFINITY', + meta_params => "resource-stickiness=INFINITY ${meta_params}", location_rule => $location_rule, + op_params => $op_params, tries => $pcs_tries, } diff --git a/manifests/profile/pacemaker/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp index ab7e102cd..a001ffa2d 100644 --- a/manifests/profile/pacemaker/haproxy.pp +++ b/manifests/profile/pacemaker/haproxy.pp @@ -31,6 +31,14 @@ # (false means disabled, and true means enabled) # Defaults to hiera('tripleo::firewall::manage_firewall', true) # +# [*meta_params*] +# (optional) Additional meta parameters to pass to "pcs resource create" for the VIP +# Defaults to '' +# +# [*op_params*] +# (optional) Additional op parameters to pass to "pcs resource create" for the VIP +# Defaults to '' +# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. @@ -44,6 +52,8 @@ class tripleo::profile::pacemaker::haproxy ( $bootstrap_node = hiera('haproxy_short_bootstrap_node_name'), $enable_load_balancer = hiera('enable_load_balancer', true), $manage_firewall = hiera('tripleo::firewall::manage_firewall', true), + $meta_params = '', + $op_params = '', $step = Integer(hiera('step')), $pcs_tries = hiera('pcs_tries', 20), ) { @@ -93,6 +103,8 @@ class tripleo::profile::pacemaker::haproxy ( vip_name => 'control', ip_address => $control_vip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, require => Pacemaker::Property['haproxy-role-node-property'], } @@ -103,6 +115,8 @@ class tripleo::profile::pacemaker::haproxy ( vip_name => 'public', ip_address => $public_vip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, require => Pacemaker::Property['haproxy-role-node-property'], } @@ -113,6 +127,8 @@ class tripleo::profile::pacemaker::haproxy ( vip_name => 'redis', ip_address => $redis_vip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, require => Pacemaker::Property['haproxy-role-node-property'], } @@ -126,6 +142,8 @@ class tripleo::profile::pacemaker::haproxy ( vip_name => $net_name, ip_address => $virtual_ip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, require => Pacemaker::Property['haproxy-role-node-property'], } diff --git a/manifests/profile/pacemaker/haproxy_bundle.pp b/manifests/profile/pacemaker/haproxy_bundle.pp index b39a600bc..c76d31f56 100644 --- a/manifests/profile/pacemaker/haproxy_bundle.pp +++ b/manifests/profile/pacemaker/haproxy_bundle.pp @@ -59,6 +59,14 @@ # when TLS is enabled in the internal network # Defaults to undef # +# [*meta_params*] +# (optional) Additional meta parameters to pass to "pcs resource create" for the VIP +# Defaults to '' +# +# [*op_params*] +# (optional) Additional op parameters to pass to "pcs resource create" for the VIP +# Defaults to '' +# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. @@ -78,6 +86,8 @@ class tripleo::profile::pacemaker::haproxy_bundle ( $internal_certs_directory = undef, $internal_keys_directory = undef, $deployed_ssl_cert_path = hiera('tripleo::haproxy::service_certificate', undef), + $meta_params = '', + $op_params = '', $step = Integer(hiera('step')), $pcs_tries = hiera('pcs_tries', 20), ) { @@ -239,6 +249,8 @@ class tripleo::profile::pacemaker::haproxy_bundle ( vip_name => 'control', ip_address => $control_vip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, } @@ -248,6 +260,8 @@ class tripleo::profile::pacemaker::haproxy_bundle ( vip_name => 'public', ip_address => $public_vip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, } @@ -257,6 +271,8 @@ class tripleo::profile::pacemaker::haproxy_bundle ( vip_name => 'redis', ip_address => $redis_vip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, } @@ -269,6 +285,8 @@ class tripleo::profile::pacemaker::haproxy_bundle ( vip_name => $net_name, ip_address => $virtual_ip, location_rule => $haproxy_location_rule, + meta_params => $meta_params, + op_params => $op_params, pcs_tries => $pcs_tries, } }