Merge "Add external LB management handler hook interface"
This commit is contained in:
commit
a4a190b907
@ -47,6 +47,19 @@ Example playbook
|
||||
.. literalinclude:: ../../examples/playbook.yml
|
||||
:language: yaml
|
||||
|
||||
External Restart Hooks
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When the role performs a restart of the service, it will notify an Ansible
|
||||
handler named ``Manage LB``, which is a noop within this role. In the
|
||||
playbook, other roles may be loaded before and after this role which will
|
||||
implement Ansible handler listeners for ``Manage LB``, allowing external roles
|
||||
to manage the load balancer endpoints responsible for sending traffic to the
|
||||
servers being restarted by marking them in maintenance or active mode,
|
||||
draining sessions, etc. For an example implementation, please reference the
|
||||
`ansible-haproxy-endpoints role <https://github.com/Logan2211/ansible-haproxy-endpoints>`_
|
||||
used by the openstack-ansible project.
|
||||
|
||||
Tags
|
||||
~~~~
|
||||
|
||||
@ -56,4 +69,3 @@ The ``cinder-install`` tag can be used to install and upgrade.
|
||||
|
||||
The ``cinder-config`` tag can be used to maintain configuration of the
|
||||
service.
|
||||
|
||||
|
@ -67,3 +67,7 @@
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
|
||||
- meta: noop
|
||||
listen: Manage LB
|
||||
when: false
|
||||
|
@ -50,6 +50,7 @@
|
||||
group: "root"
|
||||
with_items: "{{ filtered_cinder_services }}"
|
||||
notify:
|
||||
- Manage LB
|
||||
- Restart cinder services
|
||||
|
||||
- name: Place the systemd init script
|
||||
@ -63,4 +64,5 @@
|
||||
config_type: "ini"
|
||||
with_items: "{{ filtered_cinder_services }}"
|
||||
notify:
|
||||
- Manage LB
|
||||
- Restart cinder services
|
||||
|
@ -80,7 +80,9 @@
|
||||
dest: "{{ cinder_bin | dirname }}"
|
||||
copy: "no"
|
||||
when: cinder_get_venv | changed
|
||||
notify: Restart cinder services
|
||||
notify:
|
||||
- Manage LB
|
||||
- Restart cinder services
|
||||
|
||||
- name: Install pip packages
|
||||
pip:
|
||||
@ -97,7 +99,9 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
when: cinder_get_venv | failed or cinder_get_venv | skipped
|
||||
notify: Restart cinder services
|
||||
notify:
|
||||
- Manage LB
|
||||
- Restart cinder services
|
||||
|
||||
- name: Remove python from path first (CentOS, openSUSE)
|
||||
file:
|
||||
|
@ -40,6 +40,7 @@
|
||||
config_overrides: "{{ cinder_policy_overrides }}"
|
||||
config_type: "json"
|
||||
notify:
|
||||
- Manage LB
|
||||
- Restart cinder services
|
||||
|
||||
- name: Copy cinder configs
|
||||
@ -51,6 +52,7 @@
|
||||
with_fileglob:
|
||||
- rootwrap.d/*
|
||||
notify:
|
||||
- Manage LB
|
||||
- Restart cinder services
|
||||
|
||||
- name: Ensure cinder tgt include
|
||||
|
@ -29,4 +29,5 @@
|
||||
with_items: "{{ filtered_cinder_services }}"
|
||||
when: item.wsgi_app | default(False)
|
||||
notify:
|
||||
- Manage LB
|
||||
- Restart cinder services
|
||||
|
Loading…
x
Reference in New Issue
Block a user