Activity log for bug #1871548

Date Who What changed Old value New value Message
2020-04-08 06:33:54 Xing Zhang bug added bug
2020-04-08 06:57:03 Xing Zhang description **Bug Report** What happened: When a container changed, such as we changes configurations in nova-api, this will restart all nova containers, which is not the expected result especially in production environment. What you expected to happen: Only restart the one needs to be restarted How to reproduce it (minimal and precise): 1. create or modify config file in "{{ node_custom_config }}/nova/nova-api.conf" 2. add or change some config [DEFAULT] reserved_host_memory_mb = 64 3. deploy/reconfigure/upgrade using kolla-ansible **Environment**: config tasks using with_dict and notify after https://review.opendev.org/#/c/647699/ e.g. some tasks in tasks/config.yml - name: Copying over extra CA certificates become: true copy: src: "{{ node_config }}/certificates/ca/" dest: "{{ node_config_directory }}/{{ item.key }}/ca-certificates" mode: "0644" when: - item.value.enabled | bool - inventory_hostname in groups[item.value.group] - kolla_copy_ca_into_containers | bool with_dict: "{{ nova_services }}" notify: - "Restart {{ item.key }} container" - name: Copying over nova.conf become: true vars: service_name: "{{ item.key }}" merge_configs: sources: - "{{ role_path }}/templates/nova.conf.j2" - "{{ node_custom_config }}/global.conf" - "{{ node_custom_config }}/nova.conf" - "{{ node_custom_config }}/nova/{{ item.key }}.conf" - "{{ node_custom_config }}/nova/{{ inventory_hostname }}/nova.conf" dest: "{{ node_config_directory }}/{{ item.key }}/nova.conf" mode: "0660" when: - inventory_hostname in groups[item.value.group] - item.value.enabled | bool - item.key in nova_services_require_nova_conf with_dict: "{{ nova_services }}" notify: - "Restart {{ item.key }} container" **Bug Report** What happened: When a container changed, such as we changes configurations in nova-api, this will restart all nova containers, which is not the expected result especially in production environment. See logs at [1] pasted below. What you expected to happen: Only restart the one needs to be restarted How to reproduce it (minimal and precise): 1. create or modify config file in "{{ node_custom_config }}/nova/nova-api.conf" 2. add or change some config [DEFAULT] reserved_host_memory_mb = 64 3. deploy/reconfigure/upgrade using kolla-ansible **Environment**: config tasks using with_dict and notify after https://review.opendev.org/#/c/647699/ e.g. some tasks in tasks/config.yml - name: Copying over extra CA certificates   become: true   copy:     src: "{{ node_config }}/certificates/ca/"     dest: "{{ node_config_directory }}/{{ item.key }}/ca-certificates"     mode: "0644"   when:     - item.value.enabled | bool     - inventory_hostname in groups[item.value.group]     - kolla_copy_ca_into_containers | bool   with_dict: "{{ nova_services }}"   notify:     - "Restart {{ item.key }} container" - name: Copying over nova.conf   become: true   vars:     service_name: "{{ item.key }}"   merge_configs:     sources:       - "{{ role_path }}/templates/nova.conf.j2"       - "{{ node_custom_config }}/global.conf"       - "{{ node_custom_config }}/nova.conf"       - "{{ node_custom_config }}/nova/{{ item.key }}.conf"       - "{{ node_custom_config }}/nova/{{ inventory_hostname }}/nova.conf"     dest: "{{ node_config_directory }}/{{ item.key }}/nova.conf"     mode: "0660"   when:     - inventory_hostname in groups[item.value.group]     - item.value.enabled | bool     - item.key in nova_services_require_nova_conf   with_dict: "{{ nova_services }}"   notify:     - "Restart {{ item.key }} container" [1] ansible logs TASK [nova : Copying over nova.conf] ***** skipping: [control1] ... skipping: [control2] ... ... ok: [control3] ... ... changed: [control1] ... ... RUNNING HANDLER [nova : Restart placement-api container] ***** changed: [control1] RUNNING HANDLER [nova : Restart nova-api container] ***** changed: [control1] RUNNING HANDLER [nova : Restart nova-scheduler container] ***** changed: [control1] RUNNING HANDLER [nova : Restart nova-conductor container] ***** changed: [control1] RUNNING HANDLER [nova : Restart nova-consoleauth container] ***** changed: [control1] RUNNING HANDLER [nova : Restart nova-novncproxy container] ***** changed: [control1]
2020-04-08 07:44:01 Radosław Piliszek marked as duplicate 1863510