Remove the last cs_shadow
Closes-Bug: 1395672 Change-Id: I2c434ea4e2c44e6ef39e99d3fbb2601acec3c8c3 Related-Blueprint: pacemaker-improvements
This commit is contained in:
parent
5a5275370b
commit
fc2d6cd5f3
@ -1,59 +0,0 @@
|
||||
class corosync::commitorder {
|
||||
include 'heat::params'
|
||||
include 'ceilometer::params'
|
||||
|
||||
$heat = $heat::params::engine_service_name
|
||||
$haproxy = 'p_haproxy'
|
||||
$mysql = 'mysql'
|
||||
$galera = 'p_mysql'
|
||||
$ceilometer_central = "p_${ceilometer::params::agent_central_service_name}"
|
||||
$ceilometer_alarm = "p_${ceilometer::params::alarm_evaluator_service}"
|
||||
$metadata = 'p_neutron-metadata-agent'
|
||||
$ovs = 'ovs'
|
||||
$l3 = 'l3'
|
||||
$dhcp = 'dhcp'
|
||||
|
||||
# anchor {"cib-haproxy-start":} ->
|
||||
# anchor {"cib-haproxy-end":} ->
|
||||
anchor {"cib-mysql-start":} ->
|
||||
anchor {"cib-mysql-end":} ->
|
||||
anchor {"cib-galera-start":} ->
|
||||
anchor {"cib-galera-end":} ->
|
||||
anchor {"cib-metadata-start":} ->
|
||||
anchor {"cib-metadata-end":} ->
|
||||
anchor {"cib-ovs-start":} ->
|
||||
anchor {"cib-ovs-end":} ->
|
||||
anchor {"cib-dhcp-start":} ->
|
||||
anchor {"cib-dhcp-end":} ->
|
||||
anchor {"cib-l3-start":} ->
|
||||
anchor {"cib-l3-end":} ->
|
||||
anchor {"cib-heat-start":} ->
|
||||
anchor {"cib-heat-end":} ->
|
||||
anchor {"cib-ceilometer-central-start":} ->
|
||||
anchor {"cib-ceilometer-central-end":} ->
|
||||
anchor {"cib-ceilometer-alarm-start":} ->
|
||||
anchor {"cib-ceilometer-alarm-end":}
|
||||
|
||||
# Anchor["cib-haproxy-start"] -> Cs_shadow <| title == $haproxy |> -> Cs_commit <| title == $haproxy |> -> Anchor["cib-haproxy-end"]
|
||||
|
||||
Anchor["cib-mysql-start"] -> Cs_shadow <| title == $mysql |> -> Cs_commit <| title == $mysql |> -> Anchor["cib-mysql-end"]
|
||||
|
||||
Anchor["cib-galera-start"] -> Cs_shadow <| title == $galera |> -> Cs_commit <| title == $galera |> -> Anchor["cib-galera-end"]
|
||||
|
||||
Anchor["cib-metadata-start"] -> Cs_shadow <| title == $metadata |> -> Cs_commit <| title == $metadata |> -> Anchor["cib-metadata-end"]
|
||||
|
||||
Anchor["cib-ovs-start"] -> Cs_shadow <| title == $ovs |> -> Cs_commit <| title == $ovs |> -> Anchor["cib-ovs-end"]
|
||||
|
||||
Anchor["cib-dhcp-start"] -> Cs_shadow <| title == $dhcp |> -> Cs_commit <| title == $dhcp |> -> Anchor["cib-dhcp-end"]
|
||||
|
||||
Anchor["cib-l3-start"] -> Cs_shadow <| title == $l3 |> -> Cs_commit <| title == $l3 |> -> Anchor["cib-l3-end"]
|
||||
|
||||
Anchor["cib-heat-start"] -> Cs_shadow <| title == $heat |> -> Cs_commit <| title == $heat |> -> Anchor ["cib-heat-end"]
|
||||
|
||||
Anchor["cib-ceilometer-central-start"] -> Cs_shadow <| title == $ceilometer_central |> -> Cs_commit <| title == $ceilometer_central |> -> Anchor["cib-ceilometer-central-end"]
|
||||
|
||||
Anchor ["cib-ceilometer-alarm-start"]-> Cs_shadow <| title == $ceilometer_alarm |> -> Cs_commit <| title == $ceilometer_alarm |> -> Anchor["cib-ceilometer-alarm-end"]
|
||||
|
||||
notify { 'Corosync commit order have been set!' :}
|
||||
|
||||
}
|
@ -66,7 +66,7 @@ class mysql::server (
|
||||
Class['mysql::server'] -> Class['mysql::config']
|
||||
Class['mysql'] -> Class['mysql::server']
|
||||
|
||||
if !defined(Package[mysql-client]) {
|
||||
if !defined(Package['mysql-client']) {
|
||||
package { 'mysql-client':
|
||||
name => $package_name,
|
||||
}
|
||||
@ -83,7 +83,7 @@ class mysql::server (
|
||||
}
|
||||
File['/etc/init.d/mysqld'] -> Service['mysql']
|
||||
}
|
||||
Package[mysql-client] -> Package[mysql-server]
|
||||
Package['mysql-client'] -> Package['mysql-server']
|
||||
|
||||
service { 'mysql':
|
||||
name => $service_name,
|
||||
@ -95,12 +95,8 @@ class mysql::server (
|
||||
}
|
||||
elsif ($custom_setup_class == 'pacemaker_mysql') {
|
||||
include mysql
|
||||
Package[mysql-server] -> Class['mysql::config']
|
||||
Package[mysql-server] -> Cs_shadow['mysql']
|
||||
Package[mysql-client] -> Package[mysql-server]
|
||||
Cs_commit['mysql'] -> Service['mysql']
|
||||
#Cs_property <||> -> Cs_shadow <||>
|
||||
#Cs_shadow['mysql'] -> Service['mysql']
|
||||
Package['mysql-server'] -> Class['mysql::config']
|
||||
Package['mysql-client'] -> Package['mysql-server']
|
||||
|
||||
$config_hash['custom_setup_class'] = $custom_setup_class
|
||||
$allowed_hosts = '%'
|
||||
@ -108,7 +104,7 @@ class mysql::server (
|
||||
create_resources( 'class', { 'mysql::config' => $config_hash })
|
||||
Class['mysql::config'] -> Cs_resource["p_${service_name}"]
|
||||
|
||||
if !defined(Package[mysql-client]) {
|
||||
if !defined(Package['mysql-client']) {
|
||||
package { 'mysql-client':
|
||||
name => $package_name,
|
||||
}
|
||||
@ -170,13 +166,11 @@ class mysql::server (
|
||||
}
|
||||
### end hacks
|
||||
|
||||
cs_shadow { 'mysql': cib => 'mysql' } ->
|
||||
cs_resource { "p_${service_name}":
|
||||
ensure => present,
|
||||
primitive_class => 'ocf',
|
||||
provided_by => 'heartbeat',
|
||||
primitive_type => 'mysql',
|
||||
cib => 'mysql',
|
||||
multistate_hash => {'type'=>'master'},
|
||||
ms_metadata => {'notify' => "true"},
|
||||
parameters => {
|
||||
@ -196,13 +190,11 @@ class mysql::server (
|
||||
}
|
||||
}->
|
||||
|
||||
cs_commit { 'mysql': cib => 'mysql' } ->
|
||||
|
||||
service { 'mysql':
|
||||
name => "p_${service_name}",
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
require => [Package['mysql-server'], Cs_commit['mysql']],
|
||||
require => [Package['mysql-server']],
|
||||
provider => 'pacemaker',
|
||||
}
|
||||
|
||||
@ -210,7 +202,7 @@ class mysql::server (
|
||||
cs_colocation { 'mysql_to_internal-vip':
|
||||
primitives => ['vip__management',"master_p_${service_name}:Master"],
|
||||
score => 'INFINITY',
|
||||
require => [Cs_resource["p_${service_name}"], Cs_commit['mysql']],
|
||||
require => [Cs_resource["p_${service_name}"]],
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ describe 'mysql::server' do
|
||||
:ensure => 'running',
|
||||
:enable => 'true',
|
||||
:provider => 'upstart',
|
||||
:require => 'Package[mysql-server]'
|
||||
:require => 'Package["mysql-server"]'
|
||||
)}
|
||||
end
|
||||
|
||||
@ -80,7 +80,7 @@ describe 'mysql::server' do
|
||||
:name => param_values[:service_name],
|
||||
:ensure => param_values[:enabled] ? 'running' : 'stopped',
|
||||
:enable => param_values[:enabled],
|
||||
:require => 'Package[mysql-server]'
|
||||
:require => 'Package["mysql-server"]'
|
||||
)}
|
||||
|
||||
it { should contain_service('mysqld').without_provider }
|
||||
|
@ -334,7 +334,6 @@ node default {
|
||||
/^(ha|ha_compact)$/: {
|
||||
include "osnailyfacter::cluster_ha"
|
||||
class {'os_common':}
|
||||
class {'corosync::commitorder': stage=>'main'}
|
||||
}
|
||||
"rpmcache": { include osnailyfacter::rpmcache }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user