Merge "Refactor services' check-containers and optimise"
This commit is contained in:
commit
afa42820db
@ -267,6 +267,8 @@ EXAMPLES = '''
|
||||
def generate_module():
|
||||
# NOTE(jeffrey4l): add empty string '' to choices let us use
|
||||
# pid_mode: "{{ service.pid_mode | default ('') }}" in yaml
|
||||
# NOTE(r-krcek): arguments_spec should also be reflected in the list of
|
||||
# arguments in service-check-containers role
|
||||
argument_spec = dict(
|
||||
common_options=dict(required=False, type='dict', default=dict()),
|
||||
action=dict(required=True, type='str',
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check aodh containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check barbican containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check blazar containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check ceilometer containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,17 +1,3 @@
|
||||
---
|
||||
- name: Check cinder containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
tmpfs: "{{ item.value.tmpfs | default(omit) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
ipc_mode: "{{ item.value.ipc_mode | default('') }}"
|
||||
with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -35,8 +35,6 @@
|
||||
with_nested:
|
||||
- "{{ cinder_services | dict2items }}"
|
||||
- "{{ cinder_ceph_backends + [cinder_backup_ceph_backend] }}"
|
||||
notify:
|
||||
- "Restart {{ service_name }} container"
|
||||
|
||||
- name: Copy over Ceph keyring files for cinder-volume
|
||||
vars:
|
||||
@ -51,8 +49,6 @@
|
||||
when:
|
||||
- external_ceph_cephx_enabled | bool
|
||||
- service | service_enabled_and_mapped_to_host
|
||||
notify:
|
||||
- Restart cinder-volume container
|
||||
|
||||
- name: Copy over Ceph keyring files for cinder-backup
|
||||
vars:
|
||||
@ -69,8 +65,6 @@
|
||||
when:
|
||||
- external_ceph_cephx_enabled | bool
|
||||
- service | service_enabled_and_mapped_to_host
|
||||
notify:
|
||||
- Restart cinder-backup container
|
||||
|
||||
- name: Ensuring config directory has correct owner and permission
|
||||
become: true
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check cloudkitty containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check collectd containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ collectd_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check common containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
environment: "{{ item.value.environment }}"
|
||||
with_dict: "{{ common_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check cyborg containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -9,8 +9,6 @@
|
||||
- designate_backend_external == 'bind9'
|
||||
- item.key in [ "designate-worker" ]
|
||||
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
|
||||
- name: Copying over rndc.key (designate_backend_external)
|
||||
template:
|
||||
@ -22,5 +20,3 @@
|
||||
- designate_backend_external == 'bind9'
|
||||
- item.key in [ "designate-worker" ]
|
||||
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check designate containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check etcd containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
environment: "{{ item.value.environment }}"
|
||||
with_dict: "{{ etcd_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,16 +1,3 @@
|
||||
---
|
||||
- name: Check glance containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(omit) }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ glance_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -21,8 +21,6 @@
|
||||
become: true
|
||||
when: inventory_hostname in groups['glance-api']
|
||||
with_items: "{{ glance_ceph_backends }}"
|
||||
notify:
|
||||
- Restart glance-api container
|
||||
|
||||
- name: Copy over ceph Glance keyrings
|
||||
vars:
|
||||
@ -34,8 +32,6 @@
|
||||
become: true
|
||||
with_items: "{{ glance_ceph_backends }}"
|
||||
when: inventory_hostname in groups['glance-api']
|
||||
notify:
|
||||
- Restart glance-api container
|
||||
|
||||
- name: Ensuring config directory has correct owner and permission
|
||||
file:
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check gnocchi containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -18,8 +18,6 @@
|
||||
mode: "0660"
|
||||
become: true
|
||||
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
|
||||
- name: Copy over ceph Gnocchi keyrings
|
||||
template:
|
||||
@ -28,8 +26,6 @@
|
||||
mode: "0660"
|
||||
become: true
|
||||
with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
|
||||
- name: Ensuring config directory has correct owner and permission
|
||||
become: true
|
||||
|
@ -1,13 +1,3 @@
|
||||
---
|
||||
- name: Check grafana containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ grafana_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,25 +1,3 @@
|
||||
---
|
||||
- name: Check hacluster containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image | default(omit) }}"
|
||||
volumes: "{{ service.volumes | default(omit) }}"
|
||||
dimensions: "{{ service.dimensions | default(omit) }}"
|
||||
volumes_from: "{{ service.volumes_from | default(omit) }}"
|
||||
privileged: "{{ service.privileged | default(omit) }}"
|
||||
cap_add: "{{ service.cap_add | default(omit) }}"
|
||||
environment: "{{ service.environment | default(omit) }}"
|
||||
ipc_mode: "{{ service.ipc_mode | default(omit) }}"
|
||||
pid_mode: "{{ service.pid_mode | default(omit) }}"
|
||||
security_opt: "{{ service.security_opt | default(omit) }}"
|
||||
labels: "{{ service.labels | default(omit) }}"
|
||||
command: "{{ service.command | default(omit) }}"
|
||||
vars:
|
||||
service_name: "{{ item.key }}"
|
||||
service: "{{ item.value }}"
|
||||
with_dict: "{{ hacluster_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ service_name }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check heat containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ heat_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Deploy horizon container
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
environment: "{{ item.value.environment }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ horizon_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,13 +1,3 @@
|
||||
---
|
||||
- name: Check influxdb containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ influxdb_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,17 +1,3 @@
|
||||
---
|
||||
- name: Check ironic containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
cap_add: "{{ item.value.cap_add | default([]) }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check iscsi containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
ipc_mode: "{{ item.value.ipc_mode }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ iscsi_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check keystone containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,16 +1,3 @@
|
||||
---
|
||||
- name: Check kuryr containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
cap_add: "{{ item.value.cap_add }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ kuryr_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check LetsEncrypt containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
with_dict: "{{ letsencrypt_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check loadbalancer containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
with_dict: "{{ loadbalancer_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check magnum containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
environment: "{{ item.value.environment }}"
|
||||
with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check manila containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ manila_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -23,8 +23,6 @@
|
||||
- inventory_hostname in groups['manila-share']
|
||||
- item.enabled | bool
|
||||
with_items: "{{ manila_ceph_backends }}"
|
||||
notify:
|
||||
- Restart manila-share container
|
||||
|
||||
- name: Copy over ceph Manila keyrings
|
||||
template:
|
||||
@ -36,8 +34,6 @@
|
||||
when:
|
||||
- inventory_hostname in groups['manila-share']
|
||||
- item.enabled | bool
|
||||
notify:
|
||||
- Restart manila-share container
|
||||
|
||||
- name: Ensuring config directory has correct owner and permission
|
||||
become: true
|
||||
|
@ -83,7 +83,5 @@
|
||||
volumes: "{{ service.volumes }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
environment: "{{ service.environment }}"
|
||||
listen:
|
||||
- Restart mariadb-clustercheck container
|
||||
when:
|
||||
- service | service_enabled_and_mapped_to_host
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check mariadb containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ mariadb_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check masakari containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
ipc_mode: "{{ item.value.ipc_mode | default(omit) }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check memcached container
|
||||
vars:
|
||||
service: "{{ memcached_services.memcached }}"
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||
when: service | service_enabled_and_mapped_to_host
|
||||
notify: Restart memcached container
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check mistral containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ mistral_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check multipathd containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
ipc_mode: "{{ item.value.ipc_mode }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
with_dict: "{{ multipathd_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,16 +1,3 @@
|
||||
---
|
||||
- name: Check neutron containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ neutron_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,4 +1,6 @@
|
||||
---
|
||||
project_name: "nova"
|
||||
|
||||
nova_cell_services:
|
||||
nova-libvirt:
|
||||
container_name: nova_libvirt
|
||||
|
@ -1,19 +1,3 @@
|
||||
---
|
||||
- name: Check nova-cell containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
pid_mode: "{{ item.value.pid_mode | default('') }}"
|
||||
cgroupns_mode: "{{ item.value.cgroupns_mode | default(omit) }}"
|
||||
ipc_mode: "{{ item.value.ipc_mode | default(omit) }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ nova_cell_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -61,8 +61,6 @@
|
||||
- inventory_hostname in groups[nova_cell_compute_group]
|
||||
- nova_backend == "rbd"
|
||||
- external_ceph_cephx_enabled | bool
|
||||
notify:
|
||||
- Restart {{ item }} container
|
||||
|
||||
- name: Copy over ceph cinder keyring file
|
||||
template:
|
||||
@ -78,8 +76,6 @@
|
||||
- inventory_hostname in groups[nova_cell_compute_group]
|
||||
- nova_backend == "rbd"
|
||||
- external_ceph_cephx_enabled | bool
|
||||
notify:
|
||||
- Restart {{ item }} container
|
||||
|
||||
- name: Copy over ceph.conf
|
||||
vars:
|
||||
@ -100,8 +96,6 @@
|
||||
when:
|
||||
- service | service_enabled_and_mapped_to_host
|
||||
- nova_backend == "rbd"
|
||||
notify:
|
||||
- Restart {{ item }} container
|
||||
|
||||
- block:
|
||||
- name: Ensure /etc/ceph directory exists (host libvirt)
|
||||
|
@ -1,18 +1,3 @@
|
||||
---
|
||||
- name: Check nova containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
pid_mode: "{{ item.value.pid_mode | default('') }}"
|
||||
ipc_mode: "{{ item.value.ipc_mode | default(omit) }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check octavia containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ octavia_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check opensearch containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
with_dict: "{{ opensearch_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check openvswitch containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck }}"
|
||||
with_dict: "{{ openvswitch_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,13 +1,3 @@
|
||||
---
|
||||
- name: Check ovn-controller containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ ovn_controller_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,13 +1,3 @@
|
||||
---
|
||||
- name: Check ovn containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ ovn_db_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart {{ item.key }} container
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check ovs containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ ovsdpdk_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,18 +1,3 @@
|
||||
---
|
||||
- name: Check placement containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
pid_mode: "{{ item.value.pid_mode | default('') }}"
|
||||
ipc_mode: "{{ item.value.ipc_mode | default(omit) }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ placement_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check prometheus containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
pid_mode: "{{ item.value.pid_mode | default('') }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
environment: "{{ item.value.environment | default(omit) }}"
|
||||
with_dict: "{{ prometheus_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check rabbitmq containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
environment: "{{ item.value.environment }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ rabbitmq_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- Restart rabbitmq container
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,15 +1,3 @@
|
||||
---
|
||||
- name: Check redis containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
environment: "{{ item.environment | default(omit) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ redis_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
30
ansible/roles/service-check-containers/tasks/main.yml
Normal file
30
ansible/roles/service-check-containers/tasks/main.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
# NOTE(r-krcek): List of arguments should follow argument_spec in
|
||||
# kolla_container module
|
||||
- name: "{{ kolla_role_name | default(project_name) }} | Check containers"
|
||||
become: true
|
||||
vars:
|
||||
service_name: "{{ item.key }}"
|
||||
service: "{{ item.value }}"
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image | default(omit) }}"
|
||||
volumes: "{{ service.volumes | default(omit) }}"
|
||||
dimensions: "{{ service.dimensions | default(omit) }}"
|
||||
tmpfs: "{{ service.tmpfs | default(omit) }}"
|
||||
volumes_from: "{{ service.volumes_from | default(omit) }}"
|
||||
privileged: "{{ service.privileged | default(omit) }}"
|
||||
cap_add: "{{ service.cap_add | default(omit) }}"
|
||||
environment: "{{ service.environment | default(omit) }}"
|
||||
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||
ipc_mode: "{{ service.ipc_mode | default(omit) }}"
|
||||
pid_mode: "{{ service.pid_mode | default(omit) }}"
|
||||
security_opt: "{{ service.security_opt | default(omit) }}"
|
||||
labels: "{{ service.labels | default(omit) }}"
|
||||
command: "{{ service.command | default(omit) }}"
|
||||
cgroupns_mode: "{{ service.cgroupns_mode | default(omit) }}"
|
||||
with_dict: "{{ lookup('vars', (kolla_role_name | default(project_name)) + '_services') | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ service_name }} container"
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check skyline container
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ horizon.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ skyline_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check tacker container
|
||||
become: true
|
||||
kolla_container:
|
||||
common_options: "{{ docker_common_options }}"
|
||||
action: "compare_container"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ tacker_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check telegraf containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
pid_mode: "{{ item.value.pid_mode }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
with_dict: "{{ telegraf_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check trove containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ trove_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check venus containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ venus_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -1,14 +1,3 @@
|
||||
---
|
||||
- name: Check watcher containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ watcher_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -13,8 +13,6 @@
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||
listen:
|
||||
- zun-api container changed
|
||||
|
||||
- name: Restart zun-wsproxy container
|
||||
vars:
|
||||
@ -30,8 +28,6 @@
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||
listen:
|
||||
- zun-wsproxy container changed
|
||||
|
||||
- name: Restart zun-compute container
|
||||
vars:
|
||||
@ -47,8 +43,6 @@
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||
listen:
|
||||
- zun-compute container changed
|
||||
|
||||
- name: Restart zun-cni-daemon container
|
||||
vars:
|
||||
@ -64,8 +58,6 @@
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||
listen:
|
||||
- zun-cni-daemon container changed
|
||||
|
||||
- name: Copy loopback binary from zun-cni-daemon container to host
|
||||
vars:
|
||||
@ -74,7 +66,6 @@
|
||||
become: true
|
||||
command: "{{ kolla_container_engine }} cp {{ service.container_name }}:/opt/loopback /opt/cni/bin/"
|
||||
# NOTE(yoctozepto): it would be cleaner to listen only on image change
|
||||
# but there is no such mechanism (yet) and container change should be
|
||||
# good enough (better than including config change triggers)
|
||||
# but there is no such mechanism (yet)
|
||||
listen:
|
||||
- zun-cni-daemon container changed
|
||||
- Restart zun-cni-daemon container
|
||||
|
@ -1,18 +1,3 @@
|
||||
---
|
||||
- name: Check zun containers
|
||||
become: true
|
||||
kolla_container:
|
||||
action: "compare_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ item.value.dimensions }}"
|
||||
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||
with_dict: "{{ zun_services | select_services_enabled_and_mapped_to_host }}"
|
||||
notify:
|
||||
# NOTE(yoctozepto): Zun differs from other projects because we want
|
||||
# to differentiate between config change and container property
|
||||
# change
|
||||
- "{{ item.key }} container changed"
|
||||
- import_role:
|
||||
name: service-check-containers
|
||||
|
@ -5,8 +5,6 @@
|
||||
dest: "{{ node_config_directory }}/zun-compute/"
|
||||
mode: "0660"
|
||||
become: true
|
||||
notify:
|
||||
- Restart zun-compute container
|
||||
|
||||
- name: Copy over Ceph keyring files for zun-compute
|
||||
copy:
|
||||
@ -15,8 +13,6 @@
|
||||
mode: "0660"
|
||||
become: true
|
||||
when: external_ceph_cephx_enabled | bool
|
||||
notify:
|
||||
- Restart zun-compute container
|
||||
|
||||
- name: Ensuring config directory has correct owner and permission
|
||||
become: true
|
||||
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Refactor services' check-containers and optimise
|
||||
|
||||
This might fix some hidden bugs where the check tasks forgot to
|
||||
include params important for the service.
|
||||
|
||||
We also get a nice optimisation by using a filtered loop instead
|
||||
of task skipping per service with 'when'. As proven in
|
||||
https://review.opendev.org/c/openstack/kolla-ansible/+/914997
|
||||
|
||||
This refactoring allows for further optimisation and
|
||||
fixing work to proceed with much less hassle. Including getting
|
||||
rid of many notify statements as the restarts are now safely handled
|
||||
by check-containers. Some notifies had to stay, because of special
|
||||
edge cases eg. in rolling upgrades and loadbalancer config.
|
||||
|
||||
One downside is we remove the little optimisation for Zun that
|
||||
ignored config change for copying loopback but this is an
|
||||
acceptable tradeoff considering the benefits above.
|
||||
|
||||
`Blueprint performance-improvements <https://blueprints.launchpad.net/kolla-ansible/+spec/performance-improvements>`__
|
Loading…
x
Reference in New Issue
Block a user