Karbor services restarting issue on conf update

In case of karbor-protection providers.d/openstack-infra.conf config file modification,
karbor-operationengine and karbor-api are restarted too, but they should
not.

karbor-operationengine startup command:
https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/karbor/templates/karbor-operationengine.json.j2#L2

karbor-api startup command:
https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/karbor/templates/karbor-api.json.j2#L2

Change-Id: I91a0273ccf46e340315cf885ea01db6e14653182
Closes-Bug: #1677542
This commit is contained in:
Bertrand Lallau 2017-03-30 11:59:07 +02:00
parent b46144573d
commit 5782a214e9
2 changed files with 5 additions and 9 deletions

View File

@ -18,7 +18,6 @@
- service.enabled | bool
- config_json.changed | bool
or karbor_conf.changed | bool
or openstack_infra_conf.changed | bool
or karbor_api_container.changed | bool
- name: Restart karbor-protection container
@ -62,5 +61,4 @@
- service.enabled | bool
- config_json.changed | bool
or karbor_conf.changed | bool
or openstack_infra_conf.changed | bool
or karbor_operationengine_container.changed | bool

View File

@ -48,19 +48,17 @@
- name: Copying over openstack-infra.conf
vars:
service: "{{ item.key }}"
service_name: 'karbor-protection'
service: "{{ karbor_services[service_name] }}"
template:
src: "providers.d/openstack-infra.conf.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/providers.d/openstack-infra.conf"
dest: "{{ node_config_directory }}/{{ service_name }}/providers.d/openstack-infra.conf"
register: openstack_infra_conf
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ karbor_services }}"
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify:
- Restart karbor-api container
- Restart karbor-protection container
- Restart karbor-operationengine container
- name: Check karbor containers
kolla_docker: