Bug 2208238

Summary: [OSP17.1]Inventory file not found on attempt to create backup for ovn migration/revert
Product: Red Hat OpenStack Reporter: Roman Safronov <rsafrono>
Component: openstack-neutronAssignee: Jakub Libosvar <jlibosva>
Status: CLOSED ERRATA QA Contact: Roman Safronov <rsafrono>
Severity: high Docs Contact:
Priority: high    
Version: 17.1 (Wallaby)CC: chrisw, dhughes, jlibosva, scohen, ykarel
Target Milestone: betaKeywords: TestBlocker, Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-18.6.1-1.20230518200958.da43b03.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-16 01:15:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Safronov 2023-05-18 10:44:26 UTC
Description of problem:

When ovn migration script started with selecting "backup" function i.e. "/usr/bin/ovn_migration.sh backup" 
I am receiving the following

TASK [recovery-backup : Generate tripleo inventory] ****************************
task path: /usr/share/ansible/neutron-ovn-migration/playbooks/roles/recovery-backup/tasks/main.yml:18
changed: [localhost] => {"changed": true, "cmd": "source /home/stack/stackrc &&\ntripleo-ansible-inventory --ansible_ssh_user tripleo-admin --static-yaml-inventory /tmp/backup-recover-temp/tripleo-inventory.yaml\n", "delta": "0:00:00.042107", "end": "2023-05-18 01:08:45.141418", "msg": "", "rc": 0, "start": "2023-05-18 01:08:45.099311", "stderr": "", "stderr_lines": [], "stdout": "DEPRECATED - This script has been deprecated.Use the inventory file tripleo-ansible-inventory.yaml located under ~/tripleo-deploy/<stack> for a Standalone/Undercloud deployment or overcloud-deploy/<stack> for the Overcloud. \nTo generate an inventory file, use the playbook in tripleo-ansible: cli-config-download.yaml", "stdout_lines": ["DEPRECATED - This script has been deprecated.Use the inventory file tripleo-ansible-inventory.yaml located under ~/tripleo-deploy/<stack> for a Standalone/Undercloud deployment or overcloud-deploy/<stack> for the Overcloud. ", "To generate an inventory file, use the playbook in tripleo-ansible: cli-config-download.yaml"]}

TASK [recovery-backup : Setup NFS on the backup node using IP 192.168.24.1] ****
task path: /usr/share/ansible/neutron-ovn-migration/playbooks/roles/recovery-backup/tasks/main.yml:27
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "source /home/stack/stackrc &&\nopenstack overcloud backup --inventory /tmp/backup-recover-temp/tripleo-inventory.yaml --setup-nfs --extra-vars '{\n        \"tripleo_backup_and_restore_server\": 192.168.24.1,\n        \"nfs_server_group_name\": Undercloud\n      }'\n", "delta": "0:00:02.161530", "end": "2023-05-18 01:08:47.546641", "msg": "non-zero return code", "rc": 1, "start": "2023-05-18 01:08:45.385111", "stderr": "The inventory file /tmp/backup-recover-temp/tripleo-inventory.yaml does not exist or is not readable", "stderr_lines": ["The inventory file /tmp/backup-recover-temp/tripleo-inventory.yaml does not exist or is not readable"], "stdout": "", "stdout_lines": []}


Version-Release number of selected component (if applicable):
RHOS-17.1-RHEL-9-20230517.n.1

How reproducible:
100%

Steps to Reproduce:
1. Deploy ovs environment
2. Run ovn_migration command to create backup for control plane nodes: /usr/bin/ovn_migration.sh backup 
3.

Actual results:
Command fails with the above error. Backup not created

Expected results:
Command passes. Backup created.

Additional info:
Note, I've did my testing on RHOS-17.1-RHEL-9-20230517.n.1 which introduced batched ovn migration (https://code.engineering.redhat.com/gerrit/c/neutron/+/440623) and changed some paths and interfaces (changed some cli command names, changed some parameters for scripts)
The issue does not happen with RHOS-17.1-RHEL-9-20230511.n.1 where backup is initiated differently

Comment 6 Roman Safronov 2023-05-28 13:04:09 UTC
Verified that the problem does not happen on RHOS-17.1-RHEL-9-20230525.n.1 with  openstack-neutron-ovn-migration-tool-18.6.1-1.20230518200958.da43b03.el9ost.noarch

Comment 14 errata-xmlrpc 2023-08-16 01:15:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2023:4577