diff --git a/deploy-edpm-reuse.yaml b/deploy-edpm-reuse.yaml index 3ff28fcca..8104f7131 100644 --- a/deploy-edpm-reuse.yaml +++ b/deploy-edpm-reuse.yaml @@ -108,6 +108,25 @@ name: reproducer tasks_from: reuse_main + - name: Find stale root-owned log files + delegate_to: controller-0 + ansible.builtin.find: + paths: /home/zuul/ci-framework-data/logs + patterns: "ansible-*.log" + file_type: file + register: _stale_logs + failed_when: false + + - name: Fix log file ownership for reuse runs + delegate_to: controller-0 + become: true + ansible.builtin.file: + path: "{{ item }}" + owner: zuul + group: zuul + loop: "{{ _stale_logs.files | default([]) | map(attribute='path') | list }}" + failed_when: false + - name: Run deployment if instructed to when: - cifmw_deploy_architecture | default(false) | bool diff --git a/roles/cleanup_openstack/tasks/detach_bmh.yaml b/roles/cleanup_openstack/tasks/detach_bmh.yaml index 0c047b3be..6fb3716d6 100644 --- a/roles/cleanup_openstack/tasks/detach_bmh.yaml +++ b/roles/cleanup_openstack/tasks/detach_bmh.yaml @@ -35,7 +35,10 @@ retries: 60 delay: 10 until: - - bmh_status.resources | length == 0 or bmh_status.resources[0].status.operationalStatus == 'detached' + - >- + bmh_status.resources | length == 0 or + bmh_status.resources[0].status is not defined or + bmh_status.resources[0].status.operationalStatus | default('') == 'detached' register: bmh_status loop: "{{ cifmw_deploy_bmh_bm_hosts_list }}" loop_control: