5 cluster_form_timeout=600
6 cluster_settle_timeout=600
7 galera_sync_timeout=600
9 if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]; then
10 pcs cluster start --all
13 while pcs status 2>&1 | grep -E '(cluster is not currently running)|(OFFLINE:)'; do
16 if (( tnow-tstart > cluster_form_timeout )) ; then
17 echo_error "ERROR: timed out forming the cluster"
22 if ! timeout -k 10 $cluster_settle_timeout crm_resource --wait; then
23 echo_error "ERROR: timed out waiting for cluster to finish transition"
27 pcs resource enable galera
28 check_resource galera started 600
29 pcs resource enable mongod
30 check_resource mongod started 600
33 while ! clustercheck; do
36 if (( tnow-tstart > galera_sync_timeout )) ; then
37 echo_error "ERROR galera sync timed out"
42 # Run all the db syncs
43 # TODO: check if this can be triggered in puppet and removed from here
44 ceilometer-dbsync --config-file=/etc/ceilometer/ceilometer.conf
46 glance-manage --config-file=/etc/glance/glance-registry.conf db_sync
47 heat-manage --config-file /etc/heat/heat.conf db_sync
48 keystone-manage db_sync
49 neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head
52 pcs resource enable memcached
53 check_resource memcached started 600
54 pcs resource enable rabbitmq
55 check_resource rabbitmq started 600
56 pcs resource enable redis
57 check_resource redis started 600
58 if pcs status | grep openstack-keystone; then
59 pcs resource enable openstack-keystone
60 check_resource openstack-keystone started 1800
62 pcs resource enable httpd
63 check_resource httpd started 1800
66 # Swift isn't controled by heat