Restart containers when ceph.conf changed
When ceph.conf changed, we need restart some containers. Change-Id: Iddeaf9dd4f288165fcef288e5384d79b61a0910b Closes-Bug: #1810010
This commit is contained in:
parent
3a5ef38f3b
commit
7d9cb44d1f
@ -56,6 +56,7 @@
|
||||
service: "{{ cinder_services[service_name] }}"
|
||||
config_json: "{{ cinder_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
cinder_conf: "{{ cinder_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceph_conf: "{{ ceph_confs.results|selectattr('item.key', 'equalto', service_name)|first if ceph_confs is defined else none }}"
|
||||
policy_overwriting: "{{ cinder_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
cinder_volume_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
become: true
|
||||
@ -76,6 +77,7 @@
|
||||
or cinder_conf.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or cinder_volume_container.changed | bool
|
||||
or ( ceph_conf is not none and ceph_conf.changed | bool )
|
||||
|
||||
- name: Restart cinder-backup container
|
||||
vars:
|
||||
@ -83,6 +85,7 @@
|
||||
service: "{{ cinder_services[service_name] }}"
|
||||
config_json: "{{ cinder_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
cinder_conf: "{{ cinder_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceph_conf: "{{ ceph_confs.results|selectattr('item.key', 'equalto', service_name)|first if ceph_confs is defined else none }}"
|
||||
policy_overwriting: "{{ cinder_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
cinder_backup_container: "{{ check_cinder_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
become: true
|
||||
@ -102,3 +105,4 @@
|
||||
or cinder_conf.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or cinder_backup_container.changed | bool
|
||||
or ( ceph_conf is not none and ceph_conf.changed | bool )
|
||||
|
@ -12,11 +12,14 @@
|
||||
dest: "{{ node_config_directory }}/{{ item.key }}/ceph.conf"
|
||||
mode: "0660"
|
||||
become: true
|
||||
register: ceph_confs
|
||||
when:
|
||||
- item.value.enabled | bool
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.key in services_need_config
|
||||
with_dict: "{{ cinder_services }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
|
||||
- include_tasks: ../../ceph_pools.yml
|
||||
vars:
|
||||
|
@ -11,14 +11,14 @@
|
||||
dest: "{{ node_config_directory }}/{{ item.key }}/ceph.conf"
|
||||
mode: "0660"
|
||||
become: true
|
||||
register: ceph_confs
|
||||
when:
|
||||
- item.value.enabled | bool
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.key in services_need_config
|
||||
with_dict: "{{ cinder_services }}"
|
||||
notify:
|
||||
- Restart cinder-volume container
|
||||
- Restart cinder-backup container
|
||||
- Restart {{ item.key }} container
|
||||
|
||||
- name: Copy over Ceph keyring files for cinder-volume
|
||||
copy:
|
||||
|
@ -80,6 +80,7 @@
|
||||
service_name: "nova-libvirt"
|
||||
service: "{{ nova_services[service_name] }}"
|
||||
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceph_conf: "{{ ceph_confs.results|selectattr('item', 'equalto', service_name)|first if ceph_confs is defined else none }}"
|
||||
nova_libvirt_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
become: true
|
||||
kolla_docker:
|
||||
@ -103,6 +104,7 @@
|
||||
- config_json.changed | bool
|
||||
or nova_libvirt_confs.changed | bool
|
||||
or nova_libvirt_container.changed | bool
|
||||
or ( ceph_conf is not none and ceph_conf.changed | bool )
|
||||
|
||||
- name: Restart nova-scheduler container
|
||||
vars:
|
||||
@ -266,6 +268,7 @@
|
||||
service: "{{ nova_services[service_name] }}"
|
||||
config_json: "{{ config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
nova_conf: "{{ nova_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceph_conf: "{{ ceph_confs.results|selectattr('item', 'equalto', service_name)|first if ceph_confs is defined else none }}"
|
||||
policy_overwriting: "{{ nova_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
nova_compute_container: "{{ check_nova_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
become: true
|
||||
@ -289,6 +292,7 @@
|
||||
or vcenter_ca_file | bool
|
||||
or nova_compute_release_file | bool
|
||||
or nova_compute_container.changed | bool
|
||||
or ( ceph_conf is not none and ceph_conf.changed | bool )
|
||||
|
||||
- name: Restart nova-compute-ironic container
|
||||
vars:
|
||||
|
@ -20,10 +20,13 @@
|
||||
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
|
||||
mode: "0660"
|
||||
become: true
|
||||
register: ceph_confs
|
||||
with_items:
|
||||
- "nova-compute"
|
||||
- "nova-libvirt"
|
||||
when: inventory_hostname in groups['compute']
|
||||
notify:
|
||||
- Restart {{ item }} container
|
||||
|
||||
- include_tasks: ../../ceph_pools.yml
|
||||
vars:
|
||||
|
@ -51,6 +51,7 @@
|
||||
dest: "{{ node_config_directory }}/{{ item }}/"
|
||||
mode: "0660"
|
||||
become: true
|
||||
register: ceph_confs
|
||||
with_items:
|
||||
- nova-compute
|
||||
- nova-libvirt
|
||||
@ -58,8 +59,7 @@
|
||||
- inventory_hostname in groups['compute']
|
||||
- nova_backend == "rbd"
|
||||
notify:
|
||||
- Restart nova-compute container
|
||||
- Restart nova-libvirt container
|
||||
- Restart {{ item }} container
|
||||
|
||||
- name: Pushing nova secret xml for libvirt
|
||||
template:
|
||||
|
Loading…
Reference in New Issue
Block a user