Adds Environment File for Removing Sahara during M/N upgrade
The default path if the operator does nothing is to keep the
sahara services on mitaka to newton upgrades.
If the operator wishes to remove sahara services then they
need to specify the provided major-upgrade-remove-sahara.yaml
environment file in the stack upgrade commands.
The existing migration to ha arch already removes the constraints
and pcs resource for sahara api/engine so we just need to stop
it from starting again if we want to remove it.
This adds a KeepSaharaServiceOnUpgrade parameter to determine if
Sahara is disabled from starting up after the controllers are
upgraded (defaults true).
Finally it is worth noting that we default the sahara services
as 'on' during converge here in the resource_registry of the
converge environment file; any subsequent stack updates where
the deployment contains sahara services will need to
include the -e /environments/services/sahara.yaml environment
file.
Related-Bug: 1630247
Change-Id: I59536cae3260e3df52589289b4f63e9ea0129407
(cherry picked from commit 2e6cc07c1a
)
This commit is contained in:
parent
a171aa58b1
commit
6d17088192
|
@ -1,2 +1,6 @@
|
|||
parameter_defaults:
|
||||
UpgradeLevelNovaCompute: ''
|
||||
|
||||
resource_registry:
|
||||
OS::TripleO::Services::SaharaApi: ../puppet/services/sahara-api.yaml
|
||||
OS::TripleO::Services::SaharaEngine: ../puppet/services/sahara-engine.yaml
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
parameter_defaults:
|
||||
KeepSaharaServicesOnUpgrade: false
|
||||
resource_registry:
|
||||
OS::TripleO::Services::SaharaApi: OS::Heat::None
|
||||
OS::TripleO::Services::SaharaEngine: OS::Heat::None
|
||||
|
|
@ -65,6 +65,5 @@ if [[ -n $(is_bootstrap_node) ]]; then
|
|||
nova-manage api_db sync
|
||||
nova-manage db online_data_migrations
|
||||
gnocchi-upgrade
|
||||
#TODO(marios):someone from sahara needs to check this:
|
||||
# sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head
|
||||
sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head
|
||||
fi
|
||||
|
|
|
@ -16,7 +16,11 @@ 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
|
||||
services=$(services_to_migrate)
|
||||
if [[ ${keep_sahara_services_on_upgrade} =~ [Ff]alse ]] ; then
|
||||
services=${services%%openstack-sahara*}
|
||||
fi
|
||||
for service in $(services); do
|
||||
manage_systemd_service start "${service%%-clone}"
|
||||
check_resource_systemd "${service%%-clone}" started 600
|
||||
done
|
||||
|
|
|
@ -22,6 +22,11 @@ parameters:
|
|||
type: boolean
|
||||
default: false
|
||||
description: If enabled, Ceph upgrade will be forced even though cluster or PGs status is not clean
|
||||
KeepSaharaServicesOnUpgrade:
|
||||
type: boolean
|
||||
default: true
|
||||
description: Whether to keep Sahara services when upgrading controller nodes from mitaka to newton
|
||||
|
||||
|
||||
resources:
|
||||
# TODO(jistr): for Mitaka->Newton upgrades and further we can use
|
||||
|
@ -127,7 +132,13 @@ resources:
|
|||
config:
|
||||
list_join:
|
||||
- ''
|
||||
- - get_file: pacemaker_common_functions.sh
|
||||
- - str_replace:
|
||||
template: |
|
||||
#!/bin/bash
|
||||
keep_sahara_services_on_upgrade='KEEP_SAHARA_SERVICES_ON_UPGRADE'
|
||||
params:
|
||||
KEEP_SAHARA_SERVICES_ON_UPGRADE: {get_param: KeepSaharaServicesOnUpgrade}
|
||||
- get_file: pacemaker_common_functions.sh
|
||||
- get_file: major_upgrade_pacemaker_migrations.sh
|
||||
- get_file: major_upgrade_controller_pacemaker_3.sh
|
||||
|
||||
|
|
Loading…
Reference in New Issue