Add var for pacemaker

Deployments with OOO previously heavily used pacemaker, they now don't.
This is to support both models.

Change-Id: I33eb697c49417d7cc76ef130e0fab57f225b65c7
This commit is contained in:
Joe Talerico 2016-12-05 12:56:17 -05:00 committed by Alex Krzos
parent b41523289c
commit 7433c9e9c6
12 changed files with 40 additions and 13 deletions

View File

@ -1 +0,0 @@
---

View File

@ -0,0 +1,3 @@
---
# If Pacemaker is managing services or not
pacemaker_controlled: false

View File

@ -6,6 +6,7 @@
- name: pacemaker default unmanaged
become: true
command: pcs property set is-managed-default=false
when: pacemaker_controlled
- name: restart ceilometer services
become: true
@ -15,6 +16,7 @@
- openstack-ceilometer-central
- openstack-ceilometer-collector
- openstack-ceilometer-notification
when: pacemaker_controlled
- name: restart gnocchi services
become: true
@ -26,6 +28,7 @@
- name: pacemaker default managed
become: true
command: pcs property set is-managed-default=true
when: pacemaker_controlled
- name: pacemaker cleanup ceilometer
become: true
@ -35,7 +38,7 @@
- openstack-ceilometer-central
- openstack-ceilometer-collector
- openstack-ceilometer-notification
when: inventory_hostname == groups['controller'][0]
when: inventory_hostname == groups['controller'][0] and pacemaker_controlled
- name: pacemaker cleanup gnocchi
become: true
@ -43,4 +46,4 @@
with_items:
- openstack-gnocchi-metricd
- openstack-gnocchi-statsd
when: inventory_hostname == groups['controller'][0]
when: inventory_hostname == groups['controller'][0] and pacemaker_controlled

View File

@ -9,6 +9,7 @@
with_items:
- openstack-cinder-api
ignore_errors: true
when: pacemaker_controlled
- name: restart cinder services
become: true
@ -22,6 +23,7 @@
with_items:
- openstack-cinder-api
ignore_errors: true
when: pacemaker_controlled
- name: cleanup cinder services
become: true
@ -29,3 +31,4 @@
with_items:
- openstack-cinder-api
ignore_errors: true
when: pacemaker_controlled

View File

@ -6,6 +6,7 @@
- name: pacemaker default unmanaged
become: true
command: pcs property set is-managed-default=false
when: pacemaker_controlled
- name: stop keystone service
become: true
@ -25,10 +26,9 @@
- name: pacemaker default managed
become: true
command: pcs property set is-managed-default=true
when: "'eventlet' in '{{ keystone_deployment }}'"
when: "'eventlet' in '{{ keystone_deployment }}' and pacemaker_controlled"
- name: pacemaker cleanup keystone
become: true
command: pcs resource cleanup openstack-keystone
when: "'eventlet' in '{{ keystone_deployment }}'"
when: "'eventlet' in '{{ keystone_deployment }}' and pacemaker_controlled"
ignore_errors: true

View File

@ -7,6 +7,7 @@
become: true
command: pcs property set is-managed-default=false
ignore_errors: true
when: pacemaker_controlled
- name: stop keystone eventlet
become: true
@ -29,14 +30,16 @@
# OSP8 and below uncomment, so only pcs managed when keystone in eventlet
# when: "'eventlet' in '{{ keystone_deployment }}'"
ignore_errors: true
when: pacemaker_controlled
- name: cleanup keystone
become: true
command: pcs resource cleanup openstack-keystone
when: "'eventlet' in '{{ keystone_deployment }}'"
when: "'eventlet' in '{{ keystone_deployment }}' and pacemaker_controlled"
ignore_errors: true
- name: cleanup httpd
become: true
command: pcs resource cleanup httpd
ignore_errors: true
when: pacemaker_controlled

View File

@ -105,12 +105,12 @@
mode: 0644
backup: true
with_items:
- ip_address: "{{ admin_ip_addr.stdout }}"
- ip_address: "{{ admin_ip_addr.stdout | default('') }}"
interface: "admin"
processes: "{{ workers }}"
port: 35357
threads: "{{ threads }}"
- ip_address: "{{ public_ip_addr.stdout }}"
- ip_address: "{{ public_ip_addr.stdout | default('') }}"
interface: "main"
processes: "{{ workers }}"
port: 5000
@ -128,8 +128,8 @@
line: "Listen {{item}}"
backup: true
with_items:
- "{{ public_ip_addr.stdout }}:5000"
- "{{ admin_ip_addr.stdout }}:35357"
- "{{ public_ip_addr.stdout | default('') }}:5000"
- "{{ admin_ip_addr.stdout | default('') }}:35357"
when: "'httpd' in '{{ keystone_deployment }}'"
notify:
- pacemaker unmanaged default
@ -145,8 +145,8 @@
line: "Listen {{item}}"
state: absent
with_items:
- "{{ public_ip_addr.stdout }}:5000"
- "{{ admin_ip_addr.stdout }}:35357"
- "{{ public_ip_addr.stdout | default('') }}:5000"
- "{{ admin_ip_addr.stdout | default('') }}:35357"
when: "'eventlet' in '{{ keystone_deployment }}'"
notify:
- pacemaker unmanaged default

View File

@ -9,6 +9,8 @@
- neutron-server
- neutron-metadata-agent
ignore_errors: true
when: pacemaker_controlled
- name: restart neutron services
service: name={{ item }} state=restarted
@ -22,6 +24,7 @@
- neutron-server
- neutron-metadata-agent
ignore_errors: true
when: pacemaker_controlled
- name: cleanup neutron services
command: pcs resource cleanup {{ item }}
@ -29,3 +32,4 @@
- neutron-server
- neutron-metadata-agent
ignore_errors: true
when: pacemaker_controlled

View File

@ -10,6 +10,7 @@
- neutron-server
- neutron-metadata-agent
ignore_errors: true
when: pacemaker_controlled
- name: restart neutron services
become: true
@ -25,6 +26,7 @@
- neutron-server
- neutron-metadata-agent
ignore_errors: true
when: pacemaker_controlled
- name: cleanup neutron services
become: true
@ -33,3 +35,4 @@
- neutron-server
- neutron-metadata-agent
ignore_errors: true
when: pacemaker_controlled

View File

@ -11,6 +11,7 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled
- name: restart nova services
become: true
@ -28,6 +29,7 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled
- name: cleanup nova services
become: true
@ -37,3 +39,4 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled

View File

@ -10,6 +10,7 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled
- name: restart nova services
service: name={{ item }} state=restarted
@ -25,6 +26,7 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled
- name: cleanup nova services
command: pcs resource cleanup {{ item }}
@ -33,3 +35,4 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled

View File

@ -11,6 +11,7 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled
- name: restart nova services
become: true
@ -28,6 +29,7 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled
- name: cleanup nova services
become: true
@ -37,3 +39,4 @@
- openstack-nova-scheduler
- openstack-nova-conductor
ignore_errors: true
when: pacemaker_controlled