Make shared storage an option

This change make the user able to choose wheter to configure instance-ha
to support a shared storage (the default) or not.
It adds a boolean named instance_ha_shared_storage, set by default to
true.

Change-Id: Ie66edcdc3b3355ff7c6f69d2bdcbfae2be96bad5
This commit is contained in:
Raoul Scarazzini 2017-08-28 12:29:42 -04:00
parent b81a2fe8ad
commit e5e27a46e9
3 changed files with 22 additions and 1 deletions

View File

@ -186,6 +186,13 @@ stonith, compute stonith and all the instance ha steps in:
ansible-playbook /home/stack/tripleo-quickstart-utils/playbooks/overcloud-instance-ha.yml -e release="rhos-10"
By default the playbook will install the instance-ha solution with the shared
storage configuration, but it is possible to make the installation in a no
shared storage environment, passing the **instance_ha_shared_storage** variable
as **false**:
ansible-playbook /home/stack/tripleo-quickstart-utils/playbooks/overcloud-instance-ha.yml -e release="rhos-10" -e instance_ha_shared_storage=false
If a user already installed STONITH for controllers and wants just to apply all
the instance HA steps with STONITH for the compute nodes can launch this:

View File

@ -5,3 +5,6 @@ working_dir: "/home/stack"
# Can be install or uninstall
instance_ha_action: "install"
# Do we have a shared storage or not?
instance_ha_shared_storage: true

View File

@ -148,8 +148,14 @@
- block:
- name: Create resource nova-evacuate
shell: |
pcs resource create nova-evacuate ocf:openstack:NovaEvacuate auth_url=$OS_AUTH_URL username=$OS_USERNAME password=$OS_PASSWORD tenant_name=$OS_TENANT_NAME
when: instance_ha_shared_storage|bool
- name: Create resource nova-evacuate (no_shared_storage)
shell: |
pcs resource create nova-evacuate ocf:openstack:NovaEvacuate auth_url=$OS_AUTH_URL username=$OS_USERNAME password=$OS_PASSWORD tenant_name=$OS_TENANT_NAME no_shared_storage=1
when: not instance_ha_shared_storage|bool
- name: Create pacemaker constraints to start VIP resources before nova-evacuate
shell: |
@ -236,7 +242,12 @@
with_items: "{{ groups['compute'] }}"
- name: Create fence-nova pacemaker resource
shell: "pcs stonith create fence-nova fence_compute auth-url=$OS_AUTH_URL login=$OS_USERNAME passwd=$OS_PASSWORD tenant-name=$OS_TENANT_NAME domain=localdomain record-only=1 no-shared-storage=False --force"
shell: "pcs stonith create fence-nova fence_compute auth-url=$OS_AUTH_URL login=$OS_USERNAME passwd=$OS_PASSWORD tenant-name=$OS_TENANT_NAME domain=localdomain record-only=1 --force"
when: instance_ha_shared_storage|bool
- name: Create fence-nova pacemaker resource (no shared storage)
shell: "pcs stonith create fence-nova fence_compute auth-url=$OS_AUTH_URL login=$OS_USERNAME passwd=$OS_PASSWORD tenant-name=$OS_TENANT_NAME domain=localdomain record-only=1 no-shared-storage=True --force"
when: not instance_ha_shared_storage|bool
- name: Create pacemaker constraint for fence-nova to fix it on controller node and set resource-discovery never
shell: "pcs constraint location fence-nova rule resource-discovery=never score=0 osprole eq controller"