5 cluster_form_timeout=600
6 cluster_settle_timeout=1800
7 galera_sync_timeout=600
9 if [[ -n $(is_bootstrap_node) ]]; 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 for vip in $(pcs resource show | grep ocf::heartbeat:IPaddr2 | grep Stopped | awk '{ print $1 }'); do
28 pcs resource enable $vip
29 check_resource_pacemaker $vip started 60
33 start_or_enable_service galera
34 check_resource galera started 600
35 start_or_enable_service redis
36 check_resource redis started 600
37 # We need mongod which is now a systemd service up and running before calling
38 # ceilometer-dbsync. There is still a race here: mongod might not be up on all nodes
39 # so ceilometer-dbsync will fail a couple of times before that. As it retries indefinitely
41 # Due to LP Bug https://bugs.launchpad.net/tripleo/+bug/1627254 am using systemctl directly atm
42 systemctl start mongod
43 check_resource mongod started 600
45 if [[ -n $(is_bootstrap_node) ]]; then
47 while ! clustercheck; do
50 if (( tnow-tstart > galera_sync_timeout )) ; then
51 echo_error "ERROR galera sync timed out"
56 # Run all the db syncs
57 # TODO: check if this can be triggered in puppet and removed from here
58 ceilometer-upgrade --config-file=/etc/ceilometer/ceilometer.conf --skip-gnocchi-resource-types
60 glance-manage --config-file=/etc/glance/glance-registry.conf db_sync
61 heat-manage --config-file /etc/heat/heat.conf db_sync
62 keystone-manage db_sync
63 neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head
65 nova-manage api_db sync
66 nova-manage db online_data_migrations
67 sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head