diff options
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 18 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 350 |
2 files changed, 317 insertions, 51 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 7053af0b..ac765321 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -268,8 +268,11 @@ if hiera('step') >= 3 { include ::neutron include ::neutron::server - include ::neutron::agents::dhcp include ::neutron::agents::l3 + include ::neutron::agents::dhcp + class { 'neutron::agents::metadata': + auth_url => join(['http://', hiera('controller_virtual_ip'), ':35357/v2.0']), + } file { '/etc/neutron/dnsmasq-neutron.conf': content => hiera('neutron_dnsmasq_options'), @@ -280,18 +283,13 @@ if hiera('step') >= 3 { } class { 'neutron::plugins::ml2': - flat_networks => split(hiera('neutron_flat_networks'), ','), + flat_networks => split(hiera('neutron_flat_networks'), ','), tenant_network_types => [hiera('neutron_tenant_network_type')], - type_drivers => [hiera('neutron_tenant_network_type')], + type_drivers => [hiera('neutron_tenant_network_type')], } - class { 'neutron::agents::ml2::ovs': - bridge_mappings => split(hiera('neutron_bridge_mappings'), ','), - tunnel_types => split(hiera('neutron_tunnel_types'), ','), - } - - class { 'neutron::agents::metadata': - auth_url => join(['http://', hiera('controller_virtual_ip'), ':35357/v2.0']), + bridge_mappings => split(hiera('neutron_bridge_mappings'), ','), + tunnel_types => split(hiera('neutron_tunnel_types'), ','), } Service['neutron-server'] -> Service['neutron-dhcp-service'] diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 684fb4a1..d3b5f857 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -104,6 +104,11 @@ if hiera('step') >= 1 { } } + # Memcached + class {'::memcached' : + service_manage => false, + } + # Galera if str2bool(hiera('enable_galera', 'true')) { $mysql_config_file = '/etc/my.cnf.d/galera.cnf' @@ -166,6 +171,10 @@ if hiera('step') >= 2 { pacemaker::resource::service { 'haproxy': clone_params => true, } + pacemaker::resource::service { $::memcached::params::service_name : + clone_params => true, + require => Class['::memcached'], + } pacemaker::resource::ocf { 'rabbitmq': ocf_agent_name => 'heartbeat:rabbitmq-cluster', @@ -202,7 +211,8 @@ if hiera('step') >= 2 { pacemaker::resource::ocf { 'galera' : ocf_agent_name => 'heartbeat:galera', - op_params => 'promote timeout=300s on-fail=block --master', + op_params => 'promote timeout=300s on-fail=block', + master_params => '', meta_params => "master-max=${galera_nodes_count} ordered=true", resource_params => "additional_parameters='--open-files-limit=16384' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}'", require => Class['::mysql::server'], @@ -350,8 +360,6 @@ MYSQL_HOST=localhost\n", include ::ceph::profile::osd } - # Memcached - include ::memcached } #END STEP 2 @@ -423,46 +431,51 @@ if hiera('step') >= 3 { class { '::nova::api' : sync_db => $sync_db, - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::nova::cert' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::nova::conductor' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::nova::consoleauth' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::nova::vncproxy' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::nova::scheduler' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } include ::nova::network::neutron + # Neutron class definitions include ::neutron class { '::neutron::server' : sync_db => $sync_db, - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::neutron::agents::dhcp' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::neutron::agents::l3' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, + } + class { 'neutron::agents::metadata': + auth_url => join(['http://', hiera('controller_virtual_ip'), ':35357/v2.0']), + manage_service => false, + enabled => false, } - file { '/etc/neutron/dnsmasq-neutron.conf': content => hiera('neutron_dnsmasq_options'), owner => 'neutron', @@ -470,30 +483,19 @@ if hiera('step') >= 3 { notify => Service['neutron-dhcp-service'], require => Package['neutron'], } - class { 'neutron::plugins::ml2': - flat_networks => split(hiera('neutron_flat_networks'), ','), + flat_networks => split(hiera('neutron_flat_networks'), ','), tenant_network_types => [hiera('neutron_tenant_network_type')], - type_drivers => [hiera('neutron_tenant_network_type')], + type_drivers => [hiera('neutron_tenant_network_type')], } - class { 'neutron::agents::ml2::ovs': - # manage_service => $non_pcmk_start, -- not implemented - enabled => $non_pcmk_start, + # manage_service => false # not implemented + enabled => false, bridge_mappings => split(hiera('neutron_bridge_mappings'), ','), tunnel_types => split(hiera('neutron_tunnel_types'), ','), + local_ip => hiera('controller_host'), } - class { 'neutron::agents::metadata': - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, - auth_url => join(['http://', hiera('controller_virtual_ip'), ':35357/v2.0']), - } - - Service['neutron-server'] -> Service['neutron-dhcp-service'] - Service['neutron-server'] -> Service['neutron-l3'] - Service['neutron-server'] -> Service['neutron-ovs-agent-service'] - Service['neutron-server'] -> Service['neutron-metadata'] include ::cinder class { '::cinder::api': @@ -700,12 +702,22 @@ if hiera('step') >= 4 { # Cinder pacemaker::resource::service { $::cinder::params::api_service : clone_params => "interleave=true", + require => Pacemaker::Resource::Service[$::keystone::params::service_name], } pacemaker::resource::service { $::cinder::params::scheduler_service : clone_params => "interleave=true", } pacemaker::resource::service { $::cinder::params::volume_service : } + pacemaker::constraint::base { 'keystone-then-cinder-api-constraint': + constraint_type => 'order', + first_resource => "${::keystone::params::service_name}-clone", + second_resource => "${::cinder::params::api_service}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::cinder::params::api_service], + Pacemaker::Resource::Service[$::keystone::params::service_name]], + } pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint': constraint_type => "order", first_resource => "${::cinder::params::api_service}-clone", @@ -742,11 +754,21 @@ if hiera('step') >= 4 { # Glance pacemaker::resource::service { $::glance::params::registry_service_name : clone_params => "interleave=true", + require => Pacemaker::Resource::Service[$::keystone::params::service_name], } pacemaker::resource::service { $::glance::params::api_service_name : clone_params => "interleave=true", } + pacemaker::constraint::base { 'keystone-then-glance-registry-constraint': + constraint_type => 'order', + first_resource => "${::keystone::params::service_name}-clone", + second_resource => "${::glance::params::registry_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name], + Pacemaker::Resource::Service[$::keystone::params::service_name]], + } pacemaker::constraint::base { 'glance-registry-then-glance-api-constraint': constraint_type => "order", first_resource => "${::glance::params::registry_service_name}-clone", @@ -756,13 +778,259 @@ if hiera('step') >= 4 { require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name], Pacemaker::Resource::Service[$::glance::params::api_service_name]], } - pacemaker::constraint::colocation { 'glance-registry-with-glance-api-colocation': - source => "${::glance::params::registry_service_name}-clone", - target => "${::glance::params::api_service_name}-clone", + pacemaker::constraint::colocation { 'glance-api-with-glance-registry-colocation': + source => "${::glance::params::api_service_name}-clone", + target => "${::glance::params::registry_service_name}-clone", score => "INFINITY", require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name], Pacemaker::Resource::Service[$::glance::params::api_service_name]], } + + # Neutron + pacemaker::resource::service { $::neutron::params::server_service: + op_params => "start timeout=90", + clone_params => "interleave=true", + require => Pacemaker::Resource::Service[$::keystone::params::service_name] + } + pacemaker::resource::service { $::neutron::params::l3_agent_service: + clone_params => "interleave=true", + } + pacemaker::resource::service { $::neutron::params::dhcp_agent_service: + clone_params => "interleave=true", + } + pacemaker::resource::service { $::neutron::params::ovs_agent_service: + clone_params => "interleave=true", + } + pacemaker::resource::service { $::neutron::params::metadata_agent_service: + clone_params => "interleave=true", + } + pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service: + ocf_agent_name => "neutron:OVSCleanup", + clone_params => "interleave=true", + } + pacemaker::resource::ocf { 'neutron-netns-cleanup': + ocf_agent_name => "neutron:NetnsCleanup", + clone_params => "interleave=true", + } + pacemaker::resource::ocf { 'neutron-scale': + ocf_agent_name => "neutron:NeutronScale", + clone_params => "globally-unique=true clone-max=3 interleave=true", + } + pacemaker::constraint::base { 'keystone-to-neutron-server-constraint': + constraint_type => "order", + first_resource => "${::keystone::params::service_name}-clone", + second_resource => "${::neutron::params::server_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::keystone::params::service_name], + Pacemaker::Resource::Service[$::neutron::params::server_service]], + } + pacemaker::constraint::base { 'neutron-server-to-neutron-scale-constraint': + constraint_type => "order", + first_resource => "${::neutron::params::server_service}-clone", + second_resource => "neutron-scale-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::neutron::params::server_service], + Pacemaker::Resource::Ocf['neutron-scale']], + } + pacemaker::constraint::base { 'neutron-scale-to-ovs-cleanup-constraint': + constraint_type => "order", + first_resource => "neutron-scale-clone", + second_resource => "${::neutron::params::ovs_cleanup_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Ocf['neutron-scale'], + Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"]], + } + pacemaker::constraint::colocation { 'neutron-scale-to-ovs-cleanup-colocation': + source => "${::neutron::params::ovs_cleanup_service}-clone", + target => "neutron-scale-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Ocf['neutron-scale'], + Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"]], + } + pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint': + constraint_type => "order", + first_resource => "${::neutron::params::ovs_cleanup_service}-clone", + second_resource => "neutron-netns-cleanup-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"], + Pacemaker::Resource::Ocf['neutron-netns-cleanup']], + } + pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation': + source => "neutron-netns-cleanup-clone", + target => "${::neutron::params::ovs_cleanup_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"], + Pacemaker::Resource::Ocf['neutron-netns-cleanup']], + } + pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint': + constraint_type => "order", + first_resource => "neutron-netns-cleanup-clone", + second_resource => "${::neutron::params::ovs_agent_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"], + Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]], + } + pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation': + source => "${::neutron::params::ovs_agent_service}-clone", + target => "neutron-netns-cleanup-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"], + Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]], + } + pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint': + constraint_type => "order", + first_resource => "${::neutron::params::ovs_agent_service}-clone", + second_resource => "${::neutron::params::dhcp_agent_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"], + Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]], + + } + pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation': + source => "${::neutron::params::dhcp_agent_service}-clone", + target => "${::neutron::params::ovs_agent_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"], + Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]], + } + pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint': + constraint_type => "order", + first_resource => "${::neutron::params::dhcp_agent_service}-clone", + second_resource => "${::neutron::params::l3_agent_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"], + Pacemaker::Resource::Service["${::neutron::params::l3_agent_service}"]] + } + pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-l3-agent-colocation': + source => "${::neutron::params::l3_agent_service}-clone", + target => "${::neutron::params::dhcp_agent_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"], + Pacemaker::Resource::Service["${::neutron::params::l3_agent_service}"]] + } + pacemaker::constraint::base { 'neutron-l3-agent-to-metadata-agent-constraint': + constraint_type => "order", + first_resource => "${::neutron::params::l3_agent_service}-clone", + second_resource => "${::neutron::params::metadata_agent_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service["${::neutron::params::l3_agent_service}"], + Pacemaker::Resource::Service["${::neutron::params::metadata_agent_service}"]] + } + pacemaker::constraint::colocation { 'neutron-l3-agent-to-metadata-agent-colocation': + source => "${::neutron::params::metadata_agent_service}-clone", + target => "${::neutron::params::l3_agent_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service["${::neutron::params::l3_agent_service}"], + Pacemaker::Resource::Service["${::neutron::params::metadata_agent_service}"]] + } + + # Nova + pacemaker::resource::service { $::nova::params::api_service_name : + clone_params => "interleave=true", + op_params => "monitor start-delay=10s", + } + pacemaker::resource::service { $::nova::params::conductor_service_name : + clone_params => "interleave=true", + op_params => "monitor start-delay=10s", + } + pacemaker::resource::service { $::nova::params::consoleauth_service_name : + clone_params => "interleave=true", + op_params => "monitor start-delay=10s", + require => Pacemaker::Resource::Service[$::keystone::params::service_name], + } + pacemaker::resource::service { $::nova::params::vncproxy_service_name : + clone_params => "interleave=true", + op_params => "monitor start-delay=10s", + } + pacemaker::resource::service { $::nova::params::scheduler_service_name : + clone_params => "interleave=true", + op_params => "monitor start-delay=10s", + } + + pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint': + constraint_type => 'order', + first_resource => "${::keystone::params::service_name}-clone", + second_resource => "${::nova::params::consoleauth_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name], + Pacemaker::Resource::Service[$::keystone::params::service_name]], + } + pacemaker::constraint::base { 'nova-consoleauth-then-nova-vncproxy-constraint': + constraint_type => "order", + first_resource => "${::nova::params::consoleauth_service_name}-clone", + second_resource => "${::nova::params::vncproxy_service_name}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name], + Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name]], + } + pacemaker::constraint::colocation { 'nova-vncproxy-with-nova-consoleauth-colocation': + source => "${::nova::params::vncproxy_service_name}-clone", + target => "${::nova::params::consoleauth_service_name}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name], + Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name]], + } + # FIXME(gfidente): novncproxy will not start unless websockify is updated to 0.6 + # which is not the case for f20 nor f21; ucomment when it becomes available + #pacemaker::constraint::base { 'nova-vncproxy-then-nova-api-constraint': + # constraint_type => "order", + # first_resource => "${::nova::params::vncproxy_service_name}-clone", + # second_resource => "${::nova::params::api_service_name}-clone", + # first_action => "start", + # second_action => "start", + # require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name], + # Pacemaker::Resource::Service[$::nova::params::api_service_name]], + #} + #pacemaker::constraint::colocation { 'nova-api-with-nova-vncproxy-colocation': + # source => "${::nova::params::api_service_name}-clone", + # target => "${::nova::params::vncproxy_service_name}-clone", + # score => "INFINITY", + # require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name], + # Pacemaker::Resource::Service[$::nova::params::api_service_name]], + #} + pacemaker::constraint::base { 'nova-api-then-nova-scheduler-constraint': + constraint_type => "order", + first_resource => "${::nova::params::api_service_name}-clone", + second_resource => "${::nova::params::scheduler_service_name}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::nova::params::api_service_name], + Pacemaker::Resource::Service[$::nova::params::scheduler_service_name]], + } + pacemaker::constraint::colocation { 'nova-scheduler-with-nova-api-colocation': + source => "${::nova::params::scheduler_service_name}-clone", + target => "${::nova::params::api_service_name}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::nova::params::api_service_name], + Pacemaker::Resource::Service[$::nova::params::scheduler_service_name]], + } + pacemaker::constraint::base { 'nova-scheduler-then-nova-conductor-constraint': + constraint_type => "order", + first_resource => "${::nova::params::scheduler_service_name}-clone", + second_resource => "${::nova::params::conductor_service_name}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::nova::params::scheduler_service_name], + Pacemaker::Resource::Service[$::nova::params::conductor_service_name]], + } + pacemaker::constraint::colocation { 'nova-conductor-with-nova-scheduler-colocation': + source => "${::nova::params::conductor_service_name}-clone", + target => "${::nova::params::scheduler_service_name}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::nova::params::scheduler_service_name], + Pacemaker::Resource::Service[$::nova::params::conductor_service_name]], + } + } } #END STEP 4 |