Add mising handlers for external Ceph.

When Nova, Glance, or Cinder are deployed alongside an external Ceph deployment
handlers will fail to trigger if keyring files are updated, which results in the
containers not being restarted.

This change adds the missing 'when' conditions for nova-libvirt, nova-compute,
cinder-volume, cinder-backup, and glance-api containers.

Change-Id: I8e183aac9a72e7a7210f7edc7cdcbaedd4fbcaa9
This commit is contained in:
Scott Solkhon 2019-03-10 21:57:05 +00:00
parent f637d139d2
commit c70d806666
6 changed files with 13 additions and 0 deletions

View File

@ -78,6 +78,7 @@
or policy_overwriting.changed | bool
or cinder_volume_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( cinder_volume_ceph_keyring is defined and cinder_volume_ceph_keyring.changed | bool )
- name: Restart cinder-backup container
vars:
@ -106,3 +107,4 @@
or policy_overwriting.changed | bool
or cinder_backup_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( cinder_backup_ceph_keyring is defined and cinder_backup_ceph_keyring.changed | bool )

View File

@ -26,6 +26,7 @@
dest: "{{ node_config_directory }}/cinder-volume/"
mode: "0660"
become: true
register: cinder_volume_ceph_keyring
with_fileglob:
- "{{ node_custom_config }}/cinder/cinder-volume/ceph.client*"
when:
@ -41,6 +42,7 @@
dest: "{{ node_config_directory }}/cinder-backup/"
mode: "0660"
become: true
register: cinder_backup_ceph_keyring
with_fileglob:
- "{{ node_custom_config }}/cinder/cinder-backup/ceph.client*"
when:

View File

@ -27,3 +27,4 @@
or policy_overwriting.changed | bool
or glance_api_container.changed | bool
or glance_upgrading | bool
or ( glance_api_ceph_files is defined and glance_api_ceph_files.changed | bool )

View File

@ -5,6 +5,7 @@
dest: "{{ node_config_directory }}/glance-api/"
mode: "0660"
become: true
register: glance_api_ceph_files
when: inventory_hostname in groups['glance-api']
with_fileglob:
- "{{ node_custom_config }}/glance/ceph*"

View File

@ -105,6 +105,9 @@
or nova_libvirt_confs.changed | bool
or nova_libvirt_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( nova_ceph_keyring is defined and nova_ceph_keyring.changed | bool )
or ( libvirt_secrets_xml is defined and libvirt_secrets_xml.changed | bool )
or ( libvirt_secrets_key is defined and libvirt_secrets_key.changed | bool )
- name: Restart nova-scheduler container
vars:
@ -293,6 +296,7 @@
or nova_compute_release_file | bool
or nova_compute_container.changed | bool
or ( ceph_conf is not none and ceph_conf.changed | bool )
or ( nova_ceph_keyring is defined and nova_ceph_keyring.changed | bool )
- name: Restart nova-compute-ironic container
vars:

View File

@ -34,6 +34,7 @@
dest: "{{ node_config_directory }}/{{ item }}/"
mode: "0660"
become: true
register: nova_ceph_keyring
with_items:
- nova-compute
- nova-libvirt
@ -67,6 +68,7 @@
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.xml"
mode: "0600"
become: true
register: libvirt_secrets_xml
when:
- inventory_hostname in groups['compute']
- item.enabled | bool
@ -102,6 +104,7 @@
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.base64"
mode: "0600"
become: true
register: libvirt_secrets_key
when:
- inventory_hostname in groups['compute']
- item.enabled | bool