diff options
author | Michele Baldessari <michele@acksyn.org> | 2016-08-26 16:46:44 +0200 |
---|---|---|
committer | Michele Baldessari <michele@acksyn.org> | 2016-09-19 12:48:00 +0200 |
commit | 63421ca73de8ed9a0033706c190bf9a6eca4b582 (patch) | |
tree | 56a48eedf915d6075873f22b3b6ad106de46bc73 /extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh | |
parent | d8f3e366a0f6d5bbdfd63d9caccb3b352b5ed60e (diff) |
Add a function to upgrade from full HA to NG HA
This is the initial work to have a function that migrates a full HA
architecture as deployed in Mitaka to the HA architecture as deployed in
Newton where only a few resources are managed by pacemaker.
The sequence is the following:
1) We remove the desired services from pacemaker's control. The services
at this point are still running normally via the systemd service as
invoked by pacemaker
2) We do a "systemctl stop <service>" on all controllers for all the
services that were removed from pacemaker's control. We do this to make
sure that during the yum upgrade, the %post sections that call
"systemctl try-restart" do not take ages, because at this point during
the upgrade rabbit is down. The only exceptions are "openstack-core"
and "delay" which are dummy pacemaker resources that do not exist on
the system
3) We do a "systemctl start <service>" on all nodes for all the services
mentioned above.
We should probably merge this patch only when newton has branched as it
is very specific to the M/N upgrade.
Closes-Bug: 1617520
Change-Id: I4c409ce58c1a57b6e0decc3cf168b62698b32e39
Diffstat (limited to 'extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh')
-rwxr-xr-x | extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh index cfe5bcfe..6bb2fa73 100755 --- a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh @@ -32,8 +32,6 @@ fi start_or_enable_service galera check_resource galera started 600 -start_or_enable_service mongod -check_resource mongod started 600 if [[ -n $(is_bootstrap_node) ]]; then tstart=$(date +%s) @@ -59,14 +57,18 @@ if [[ -n $(is_bootstrap_node) ]]; then # sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head fi -start_or_enable_service memcached -check_resource memcached started 600 start_or_enable_service rabbitmq check_resource rabbitmq started 600 start_or_enable_service redis check_resource redis started 600 -start_or_enable_service httpd -check_resource httpd started 1800 # Swift isn't controled by pacemaker systemctl_swift start + +# We need to start the systemd services we explicitely stopped at step _1.sh +# FIXME: Should we let puppet during the convergence step do the service enabling or +# should we add it here? +for $service in $(services_to_migrate); do + manage_systemd_service stop "${service%%-clone}" + check_resource_systemd "${service%%-clone}" started 600 +done |