Bug 2035808 - [OSP17.0][OVN migration] generate-inventory fails on check_stack function
Summary: [OSP17.0][OVN migration] generate-inventory fails on check_stack function
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: Alpha
: 17.0
Assignee: Jakub Libosvar
QA Contact: Roman Safronov
URL:
Whiteboard:
Depends On:
Blocks: 2019745
TreeView+ depends on / blocked
 
Reported: 2021-12-27 18:43 UTC by Roman Safronov
Modified: 2022-09-21 12:18 UTC (History)
8 users (show)

Fixed In Version: openstack-neutron-18.2.1-0.20220330172248.ca458d9.el9ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-21 12:18:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1966099 0 None None None 2022-03-23 16:35:31 UTC
OpenStack gerrit 834925 0 None MERGED ovn migration: Remove usage of tripleo-ansible-inventory 2022-05-31 18:09:52 UTC
OpenStack gerrit 835149 0 None MERGED ovn migration: Remove usage of tripleo-ansible-inventory 2022-05-31 18:09:53 UTC
Red Hat Issue Tracker OSP-11968 0 None None None 2021-12-27 18:47:10 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:18:36 UTC

Description Roman Safronov 2021-12-27 18:43:40 UTC
Description of problem:
When trying to run ovs2ovn migration on OSP17 the ovn_migration script fails on check_stack function because heat is not available and 'openstack stack show <STACK_NAME>' command does not work on OSP17 as it used to work on previous OSP versions.

(undercloud) [stack@undercloud-0 ovn_migration]$ openstack stack show overcloud
/usr/lib64/python3.6/site-packages/_yaml/__init__.py:23: DeprecationWarning: The _yaml extension module is now located at yaml._yaml and its location is subject to change.  To use the LibYAML-based parser and emitter, import from `yaml`: `from yaml import CLoader as Loader, CDumper as Dumper`.
  DeprecationWarning
public endpoint for orchestration service in regionOne region not found
(undercloud) [stack@undercloud-0 ovn_migration]$ echo $?
1



# Check if the stack exists
function check_stack {
    source $STACKRC_FILE
    openstack stack show $STACK_NAME 1> /dev/null || {
        echo "ERROR: STACK_NAME=${STACK_NAME} does not exist. Please provide the stack name or its ID "
        echo "       via STACK_NAME environment variable."
        exit 1
    }
}



Version-Release number of selected component (if applicable):
RHOS-17.0-RHEL-8-20211208.n.1

How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP17.0 with ML2/OVS backend
2. Due to BZ2035354 do the following workaround:
  a)Clone upstream neutron repo stable/wallaby branch (OSP17.0 is based on it) and copy ovn_migration.sh script to /usr/bin and ovn migration ansible playbooks to  ~/ovn_migration (according to the official documentation for the latest OSP version, https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.2/html-single/networking_with_open_virtual_network/index#ml2-ovs-to-ovn-migration-prepare_migrating-ml2ovs-to-ovn), 
i.e.
git clone -b stable/wallaby https://github.com/openstack/neutron.git
sudo cp neutron/tools/ovn_migration/tripleo_environment/ovn_migration.sh /usr/bin/
sudo chmod +x /usr/bin/ovn_migration.sh
cp -r neutron/tools/ovn_migration/tripleo_environment/playbooks/ ~/ovn_migration

3. Follow the official documentation until step 9 - try to generate inventory 
/home/stack/ovn_migration/start-ovn-migration.sh generate-inventory > /home/stack/ovn_migration/generate-inventory.log 


Actual results:
ovn_migration script fails on check_stack function

Expected results:
ovn_migration script does not fail 

Additional info:

Comment 5 Roman Safronov 2022-06-20 09:13:05 UTC
Verified that the issue does not occur on RHOS-17.0-RHEL-9-20220615.n.2

Comment 10 errata-xmlrpc 2022-09-21 12:18:08 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.0 (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-2022:6543


Note You need to log in before you can comment on or make changes to this bug.