Fixed config generation to check correct actions

A config generation check was added to a few services but the action
name checked was "genconfig" where the kolla-ansible genconfig command
actually uses the action name "config".

Stop run the handlers when action is "config".

Co-Authored-By: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
Partially-implements: blueprint better-reconfigure
Change-Id: I9d3be2f674087f340108b176c8e8e2209ffa8806
This commit is contained in:
Borne Mace 2017-01-23 19:13:11 -08:00 committed by Jeffrey Zhang
parent 7f3d7a30d9
commit bb475911d3
12 changed files with 19 additions and 5 deletions

View File

@ -14,6 +14,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
@ -37,6 +38,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool

View File

@ -68,9 +68,9 @@
volumes: "{{ item.value.volumes }}"
register: check_glance_containers
when:
- action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- action != "genconfig"
with_dict: "{{ glance_services }}"
notify:
- Restart glance-api container

View File

@ -14,6 +14,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
@ -36,6 +37,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
@ -58,6 +60,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool

View File

@ -78,6 +78,7 @@
volumes: "{{ item.value.volumes }}"
register: check_heat_containers
when:
- action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ heat_services }}"

View File

@ -14,6 +14,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
@ -39,6 +40,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
@ -60,6 +62,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool

View File

@ -179,7 +179,7 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
when:
- action != 'genconfig'
- action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
register: check_keystone_containers

View File

@ -8,6 +8,7 @@
name: "{{ service.container_name }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- memcached_config_json.changed | bool

View File

@ -29,5 +29,5 @@
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- action != "genconfig"
- action != "config"
notify: Restart memcached container

View File

@ -14,6 +14,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
@ -36,6 +37,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool

View File

@ -63,7 +63,7 @@
volumes: "{{ item.value.volumes }}"
register: check_searchlight_containers
when:
- action != 'genconfig'
- action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ searchlight_services }}"

View File

@ -14,6 +14,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool
@ -36,6 +37,7 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- config_json.changed | bool

View File

@ -69,7 +69,7 @@
volumes: "{{ item.value.volumes }}"
register: check_senlin_containers
when:
- action != 'genconfig'
- action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ senlin_services }}"