Bug 1651265

Summary: OVN migration tool- we need to add cleanup of pre-migration resource if the migration failed
Product: Red Hat OpenStack Reporter: Eran Kuris <ekuris>
Component: python-networking-ovnAssignee: Jakub Libosvar <jlibosva>
Status: CLOSED CURRENTRELEASE QA Contact: Roman Safronov <rsafrono>
Severity: high Docs Contact:
Priority: high    
Version: 14.0 (Rocky)CC: apevec, jlibosva, lhh, lmartins, majopela, slinaber
Target Milestone: z5Keywords: Reopened, Triaged, ZStream
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-networking-ovn-7.2.1-0.20200611111150.18fabca.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-07 14:37:06 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:
Attachments:
Description Flags
ovn migration none

Description Eran Kuris 2018-11-19 14:58:48 UTC
Created attachment 1507272 [details]
ovn migration

Description of problem:
If we are running OVN migration after that pre-migration resources were created in previous  it will create conflicts between the current run and the previous 
 9) (Request-ID: req-7aed8979-4091-42e2-aeec-1a901b2f5e2c)\n+ openstack router create ovn-migration-router-pre\n+ openstack router set --external-gateway public ovn-migration-router-pre\nMore than one Router exists with the name 'ovn-migration-router-pre'.\n+ openstack router add subnet ovn-migration-router-pre ovn-migration-subnet-pre\nMore than one Router exists with the name 'ovn-migration-router-pre'.\n++ openstack floating ip create --port
 ovn-migration-server-port-pre public -c floating_ip_address\n++ grep floating_ip_address\n++ awk '{print $4}'\nError while executing command: ConflictException: 409, {\"NeutronError\": {\"message\": \"Cannot associate floating IP 10.0.0.235 (3717e29a-e9e1-4b53-9da5-a07e4be4ef9c) with port 7a44095a-6153-4fb8-9de7-93077e8104f7 using fixed IP 172.168.199.6, as that fixed IP already has a floating IP on external network f6855347-fe63-4ff8-9c61-0d09
559d6b0a.\", \"type\": \"FloatingIPPortAlreadyAssociated\", \"detail\": \"\"}}\n+ server_ip=\n+ echo\n+ chmod 0600 /home/stack/ovn_migration/pre_migration_resources/ovn_migration_ssh_key\nchmod: cannot access '/home/stack/ovn_migration/pre_migratio

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.run ovn_migration.sh start-migration  when export VALIDATE_MIGRATION=True
make sure it will be failed
2. after it failed run it again 
3.

Actual results:


Expected results:


Additional info:

Comment 3 Mike Burns 2020-08-26 21:25:21 UTC
This Release is retired.  If this bug is still relevant, please reopen and retarget to an open release.

Comment 5 Jakub Libosvar 2021-03-25 15:07:49 UTC
This has been fixed 3 years ago upstream, any OSP 16.1 version should have the fix available.

Comment 6 Roman Safronov 2021-04-01 13:24:20 UTC
Was verified on RHOS-16.1-RHEL-8-20210323.n.0 with python3-networking-ovn-7.3.1-1.20201114024053.el8ost.noarch and python3-networking-ovn-migration-tool-7.3.1-1.20201114024053.el8ost.noarch.

Verified that in case we rerun ovn migration script while migration workload already exist, the workload objects are removed and then re-created successfully.