{"id":497,"sha1":"106a46efd36bf3e3f3e2a49fe5f1183d272dce24","playbook":{"id":4,"items":{"plays":32,"tasks":1505,"results":1497,"hosts":12,"files":487,"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":4,"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:57:07.871967Z","ended":"2025-12-08T14:21:54.049657Z","duration":"00:24:46.177690","name":null,"ansible_version":"2.18.6","client_version":"1.7.4","python_version":"3.12.11","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 2017, 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: Set the delegated task facts\n  ansible.builtin.set_fact:\n    _db_nova_bin: \"{{ hostvars[nova_conductor_setup_host]['nova_bin'] | default(nova_bin) }}\"\n    _db_nova_system_user_name: \"{{ hostvars[nova_conductor_setup_host]['nova_system_user_name'] | default(nova_system_user_name) }}\"\n\n# This needs to be done after Compute hosts are added.\n- name: Perform a cell_v2 discover\n  ansible.builtin.command: >-\n    {{ _db_nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf cell_v2 discover_hosts{{ (debug | bool) | ternary(' --verbose', '') }}{{\n      (nova_ironic_used | bool) | ternary(' --by-service', '') }}\n  become: true\n  become_user: \"{{ _db_nova_system_user_name }}\"\n  changed_when: false\n\n# If it exits with partial updates (exit status 1) it should be called again,\n# even if some updates initially generated errors,\n# because some updates may depend on others having completed. If it exits with status 2,\n# intervention is required to resolve the issue causing remaining updates to fail.\n# It should be considered successfully completed only when the exit status is 0.\n- name: Perform online data migrations\n  ansible.builtin.command: \"{{ _db_nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf db online_data_migrations\"\n  become: true\n  become_user: \"{{ _db_nova_system_user_name }}\"\n  changed_when: false\n  when:\n    - hostvars[nova_conductor_setup_host]['ansible_local']['openstack_ansible']['nova']['need_online_data_migrations'] | bool\n  retries: 5\n  delay: 3\n  until: \"data_migrations.rc in [0, 2]\"\n  register: data_migrations\n\n- name: Disable the online migrations requirement\n  delegate_to: \"{{ item }}\"\n  community.general.ini_file:\n    dest: \"/etc/ansible/facts.d/openstack_ansible.fact\"\n    section: nova\n    option: need_online_data_migrations\n    value: false\n    mode: \"0644\"\n  with_items: \"{{ groups[nova_services['nova-conductor']['group']] }}\"\n  when:\n    - data_migrations is not skipped\n    - data_migrations is succeeded\n\n- name: Create service and timer for archiving deleted records\n  ansible.builtin.include_role:\n    name: systemd_service\n  vars:\n    systemd_service_restart_changed: false\n    systemd_user_name: \"{{ nova_system_user_name }}\"\n    systemd_group_name: \"{{ nova_system_group_name }}\"\n    systemd_tempd_prefix: openstack\n    systemd_slice_name: \"{{ nova_system_slice_name }}\"\n    systemd_lock_dir: \"{{ nova_lock_dir }}\"\n    systemd_services:\n      - service_name: \"nova-archive-deleted\"\n        execstarts:\n          - /bin/sh -c \"{{ _db_nova_bin }}/nova-manage db archive_deleted_rows --until-complete --all-cells --before \\\"$(date -d '{{ nova_archive_deleted_before }}' +'%%Y-%%m-%%d %%H:%%M')\\\" {{ (nova_archive_deleted_purge) | ternary('--purge', '') }} {{ (nova_archive_task_log) | ternary('--task-log', '') }}\" # noqa: yaml[line-length]\n        environment:\n          UMASK: \"0640\"\n          UMASK_DIR: \"0750\"\n        program_sandboxing:\n          RuntimeDirectory: \"nova-archive-deleted\"\n        enabled: \"{{ nova_archive_deleted }}\"\n        timer:\n          state: \"{{ nova_archive_deleted | ternary('started', 'stopped') }}\"\n          enabled: \"{{ nova_archive_deleted }}\"\n          options:\n            OnCalendar: \"{{ nova_archive_deleted_on_calendar }}\"\n            RandomizedDelaySec: \"{{ nova_archive_deleted_randomized_delay_sec }}\"\n            Persistent: true\n            Unit: \"nova-archive-deleted.service\"\n      - service_name: \"nova-purge-deleted\"\n        execstarts:\n          - /bin/sh -c \"{{ _db_nova_bin }}/nova-manage db purge --all-cells --before \\\"$(date -d '{{ nova_purge_deleted_before }}' +'%%Y-%%m-%%d %%H:%%M')\\\"\" # noqa: yaml[line-length]\n        environment:\n          UMASK: \"0640\"\n          UMASK_DIR: \"0750\"\n        program_sandboxing:\n          RuntimeDirectory: \"nova-purge-deleted\"\n        enabled: \"{{ nova_purge_deleted }}\"\n        timer:\n          state: \"{{ nova_purge_deleted | ternary('started', 'stopped') }}\"\n          enabled: \"{{ nova_purge_deleted }}\"\n          options:\n            OnCalendar: \"{{ nova_purge_deleted_on_calendar }}\"\n            RandomizedDelaySec: \"{{ nova_purge_deleted_randomized_delay_sec }}\"\n            Persistent: true\n            Unit: \"nova-purge-deleted.service\"\n","created":"2025-12-08T13:57:12.350645Z","updated":"2025-12-08T13:57:12.350657Z","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible-os_nova/tasks/nova_db_post_setup.yml"}