Skip to content

Commit

Permalink
Merge pull request redhat-openstack#415 from cwolferh/nosql_begin_anchor
Browse files Browse the repository at this point in the history
extra ordering for nosql and ceilometer
  • Loading branch information
jguiditta committed Dec 3, 2014
2 parents 52aee2e + 7df202d commit 16147d9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
4 changes: 4 additions & 0 deletions puppet/modules/quickstack/manifests/db/nosql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
$service_ensure = 'running',
) {

anchor {'mongodb setup start': }
->
class { '::mongodb::globals':
service_enable => $service_enable,
service_ensure => $service_ensure,
Expand All @@ -61,4 +63,6 @@
anchor {'mongodb setup done' :
require => Exec['check_mongodb'],
}

Anchor['mongodb setup start'] -> Service[mongodb] -> Anchor['mongodb setup done']
}
28 changes: 26 additions & 2 deletions puppet/modules/quickstack/manifests/pacemaker/ceilometer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,36 @@
$_ensure = undef
}

if (str2bool_i(map_params('include_nosql'))) {
Anchor['ha mongo ready'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
if (str2bool_i(map_params('include_mysql'))) {
Exec['galera-online'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_keystone'))) {
Exec['all-keystone-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_swift'))) {
Exec['all-swift-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_glance'))) {
Exec['all-glance-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_nova'))) {
Exec['all-nova-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_cinder'))) {
Exec['all-cinder-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_neutron'))) {
Exec['all-neutron-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_heat'))) {
Exec['all-heat-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_horizon'))) {
Exec['all-horizon-nodes-are-up'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}
if (str2bool_i(map_params('include_nosql'))) {
Anchor['ha mongo ready'] -> Exec['i-am-ceilometer-vip-OR-ceilometer-is-up-on-vip']
}

class {"::quickstack::load_balancer::ceilometer":
frontend_pub_host => $ceilometer_public_vip,
Expand Down
29 changes: 29 additions & 0 deletions puppet/modules/quickstack/manifests/pacemaker/nosql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,40 @@
$_ensure = undef
}

if (str2bool_i(map_params('include_mysql'))) {
Exec['galera-online'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_keystone'))) {
Exec['all-keystone-nodes-are-up'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_swift'))) {
Exec['all-swift-nodes-are-up'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_glance'))) {
Exec['all-glance-nodes-are-up'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_nova'))) {
Exec['all-nova-nodes-are-up'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_cinder'))) {
Exec['all-cinder-nodes-are-up'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_neutron'))) {
Exec['all-neutron-nodes-are-up'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_heat'))) {
Exec['all-heat-nodes-are-up'] -> Anchor['nosql cluster start']
}
if (str2bool_i(map_params('include_horizon'))) {
Exec['all-horizon-nodes-are-up'] -> Anchor['nosql cluster start']
}

Class['::quickstack::pacemaker::common']
->
class {'::quickstack::firewall::nosql':
ports => [$nosql_port],
} ->
anchor{'nosql cluster start':} ->
class { '::quickstack::db::nosql':
bind_host => $_bind_host,
service_enable => $_enabled,
Expand Down

0 comments on commit 16147d9

Please sign in to comment.