diff --git a/ansible/roles/nova-cell/handlers/main.yml b/ansible/roles/nova-cell/handlers/main.yml index 132cc04669f8e28bfb48df4381b19bb26e508bb4..48ace99890da6978b91dab557c8941d242f615be 100644 --- a/ansible/roles/nova-cell/handlers/main.yml +++ b/ansible/roles/nova-cell/handlers/main.yml @@ -93,7 +93,7 @@ vars: service_name: "nova-libvirt" service: "{{ nova_cell_services[service_name] }}" - nova_libvirt_notify: "{{ ['Create libvirt SASL user'] if libvirt_enable_sasl | bool else [] }}" + nova_libvirt_notify: "{{ ['Checking libvirt container is ready', 'Create libvirt SASL user'] if libvirt_enable_sasl | bool else [] }}" become: true kolla_docker: action: "recreate_or_restart_container" @@ -115,6 +115,18 @@ - kolla_action != "config" notify: "{{ nova_libvirt_notify }}" + # need to wait kolla_set_configs script to overwrite sasl config file +- name: Checking libvirt container is ready + become: true + shell: + cmd: > + set -o pipefail && + {{ kolla_container_engine }} exec -i nova_libvirt ls /run/libvirtd.pid + executable: /bin/bash + register: libvirt_container_ready + until: libvirt_container_ready is succeeded + retries: 10 + # The SASL user needs to exist in order for nova-compute to start successfully. - name: Create libvirt SASL user become: true diff --git a/releasenotes/notes/bug-2015589-94427c14cd857c98.yaml b/releasenotes/notes/bug-2015589-94427c14cd857c98.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0f4eae173f65d5a2f9da74cfb44927996b1be323 --- /dev/null +++ b/releasenotes/notes/bug-2015589-94427c14cd857c98.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes create sasl account before config file is ready. + `LP#2015589 <https://launchpad.net/bugs/2015589>`__