{"id":471,"sha1":"6327fe813a2cf37e2f4dbce63767b0c3e3eac7fb","playbook":{"id":4,"items":{"plays":104,"tasks":1377,"results":1365,"hosts":2,"files":504,"records":0},"arguments":{"version":null,"verbosity":0,"private_key_file":null,"remote_user":null,"connection":"openstack.osa.ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":true,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/dynamic_inventory.py","/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/inventory.ini","/etc/openstack_deploy/inventory.ini"],"listhosts":false,"subset":null,"extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":8,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["setup-openstack.yml"]},"labels":[{"id":1,"name":"check:False"},{"id":2,"name":"tags:all"}],"started":"2025-12-08T13:39:52.478534Z","ended":"2025-12-08T14:14:54.510371Z","duration":"00:35:02.031837","name":null,"ansible_version":"2.18.6","client_version":"1.7.4","python_version":"3.12.3","server_version":"1.7.4","status":"failed","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible/playbooks/setup-openstack.yml","controller":"aio1.openstack.local","user":"root"},"content":"---\n# Copyright 2014, Rackspace US, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n- name: Reload apparmor\n  ansible.builtin.service:\n    name: apparmor\n    state: reloaded\n\n- name: Stop services\n  ansible.builtin.service:\n    name: \"{{ item.service_name }}\"\n    state: \"stopped\"\n    daemon_reload: true\n  with_items: \"{{ filtered_neutron_services }}\"\n  register: _stop\n  until: _stop is success\n  retries: 5\n  delay: 2\n  listen:\n    - \"Restart neutron services\"\n    - \"venv changed\"\n    - \"systemd service changed\"\n    - \"cert installed\"\n\n# NOTE\n# When restarting neutron-l3-agent, a non-default systemd KillMode of 'process' is used\n# to prevent Keepalived from exiting and causing a data-plane outage. As a result of this\n# some neutron processes remain running. In the case of an upgrade, these remaining\n# processes will be running code from the previous version. This step ensures these\n# orphaned processes are cleaned up correctly.\n- name: Run neutron-l3-agent process cleanup\n  ansible.builtin.shell: |\n    cgroup_path=$(findmnt -t cgroup2 -r -n -f -o target)\n    for ns_pid in $(cat ${cgroup_path}/neutron.slice/neutron-l3-agent.service/cgroup.procs); do\n      echo $(readlink -f \"/proc/$ns_pid/exe\") | egrep -qv \"keepalived|haproxy|ipsec\"\n      if [ $? -eq 0 ] || [ \"{{ neutron_l3_cleanup_on_shutdown | bool }}\" = \"True\" ]; then\n        if kill -9 \"$ns_pid\"; then\n          logger -s \"old neutron-l3-agent pid found and has been cleaned up on: \\\"$ns_pid\\\"\"\n        fi\n      fi\n    done\n  when: \"'neutron-l3-agent' in (filtered_neutron_services | map(attribute='service_key') | list)\"\n  changed_when: false\n  listen:\n    - \"Restart neutron services\"\n    - \"venv changed\"\n\n- name: Restart openvswitch\n  ansible.builtin.service:\n    name: \"{{ neutron_ovs_service_name }}\"\n    state: restarted\n  listen:\n    - \"Restart provider services\"\n  when:\n    - neutron_needs_openvswitch | bool\n    - not _neutron_ovs_disabled\n\n- name: Symlink neutron config directory\n  ansible.builtin.file:\n    # NOTE(cloudnull): The \"src\" path is relative. This ensures all files remain\n    #                  within the host/container confines when connecting to\n    #                  them using the connection plugin or the root filesystem.\n    src: \"{{ neutron_conf_version_dir | regex_replace('^/', '../') }}\"\n    dest: \"{{ neutron_conf_dir }}\"\n    state: link\n    force: true\n  when: neutron_install_method == 'source'\n  listen:\n    - \"venv changed\"\n\n- name: Drop sudoers file\n  ansible.builtin.template:\n    src: \"sudoers.j2\"\n    dest: \"/etc/sudoers.d/{{ neutron_system_user_name }}_sudoers\"\n    mode: \"0440\"\n    owner: \"root\"\n    group: \"root\"\n  listen:\n    - \"Restart neutron services\"\n    - \"venv changed\"\n\n- name: Perform a DB contract\n  ansible.builtin.command: \"{{ neutron_bin }}/neutron-db-manage upgrade --contract\"\n  become: true\n  become_user: \"{{ neutron_system_user_name }}\"\n  changed_when: false\n  when:\n    - \"ansible_local['openstack_ansible']['neutron']['need_db_contract'] | bool\"\n    - \"_neutron_is_first_play_host\"\n  listen:\n    - \"Restart neutron services\"\n    - \"venv changed\"\n\n- name: Start services\n  ansible.builtin.service:\n    name: \"{{ item.service_name }}\"\n    enabled: \"{{ item.enabled | default(True) }}\"\n    state: \"{{ item.state | default('started') }}\"\n    daemon_reload: true\n  with_items: \"{{ filtered_neutron_services }}\"\n  register: _start\n  until: _start is success\n  retries: 5\n  delay: 2\n  listen:\n    - \"Restart neutron services\"\n    - \"venv changed\"\n    - \"systemd service changed\"\n    - \"cert installed\"\n\n- name: Start ovn service\n  ansible.builtin.service:\n    name: \"{{ neutron_ovn_northd_service_name }}\"\n    state: started\n  listen:\n    - start ovn service\n\n# (NOTE) Restarting twice to cleanup some pid.\n- name: Restart ovn northd\n  ansible.builtin.service:\n    name: \"{{ neutron_ovn_northd_service_name }}\"\n    state: restarted\n  when:\n    - neutron_services['neutron-ovn-northd']['group'] in group_names and neutron_plugin_type == 'ml2.ovn'\n  listen:\n    - restart ovn service\n    - ovn cert installed\n\n- name: Restart ovn controller\n  ansible.builtin.service:\n    name: \"{{ neutron_ovn_controller_service_name }}\"\n    state: restarted\n  when:\n    - neutron_services['neutron-ovn-controller']['group'] in group_names and neutron_plugin_type == 'ml2.ovn'\n  listen:\n    - restart ovn service\n    - ovn cert installed\n","created":"2025-12-08T13:39:58.528386Z","updated":"2025-12-08T13:39:58.528435Z","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible-os_neutron/handlers/main.yml"}