Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2044341

Summary: [OSP16.1] OVN migration 'cleanup neutron trunk subports' fails in case there are no trunks
Product: Red Hat OpenStack Reporter: Roman Safronov <rsafrono>
Component: python-networking-ovnAssignee: Arnau Verdaguer <averdagu>
Status: CLOSED ERRATA QA Contact: Roman Safronov <rsafrono>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: apevec, averdagu, eolivare, jlibosva, jpalanis, lhh, majopela, scohen
Target Milestone: z9Keywords: AutomationBlocker, Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-networking-ovn-7.3.1-1.20220212033901.4e24f4c.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2051560 (view as bug list) Environment:
Last Closed: 2022-12-07 20:25:32 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:
Bug Depends On:    
Bug Blocks: 2051560    

Description Roman Safronov 2022-01-24 12:19:13 UTC
Description of problem:

ovs2ovn migration on an environment without existing trunk ports failed.

TASK [migration : Cleanup neutron trunk subports] ******************************
task path: /home/stack/ovn_migration/playbooks/roles/migration/tasks/cleanup-dataplane.yml:14
Friday 21 January 2022  18:16:09 +0000 (0:00:01.257)       0:45:14.547 ******** 
fatal: [compute-1]: FAILED! => {"changed": true, "cmd": "ovs-vsctl list interface | awk '/name[ ]*: sp[it]-/ { print $3 }' | xargs -n1 ovs-vsctl del-port\n", "delta": "0:00:00.025924", "end": "2022-01-21 18:16:09.882149", "msg": "non-zero return code", "rc": 123, "start": "2022-01-21 18:16:09.856225", "stderr": "ovs-vsctl: 'del-port' command requires at least 1 arguments", "stderr_lines": ["ovs-vsctl: 'del-port' command requires at least 1 arguments"], "stdout": "", "stdout_lines": []}
fatal: [compute-0]: FAILED! => {"changed": true, "cmd": "ovs-vsctl list interface | awk '/name[ ]*: sp[it]-/ { print $3 }' | xargs -n1 ovs-vsctl del-port\n", "delta": "0:00:00.030714", "end": "2022-01-21 18:16:09.889742", "msg": "non-zero return code", "rc": 123, "start": "2022-01-21 18:16:09.859028", "stderr": "ovs-vsctl: 'del-port' command requires at least 1 arguments", "stderr_lines": ["ovs-vsctl: 'del-port' command requires at least 1 arguments"], "stdout": "", "stdout_lines": []}
fatal: [controller-0]: FAILED! => {"changed": true, "cmd": "ovs-vsctl list interface | awk '/name[ ]*: sp[it]-/ { print $3 }' | xargs -n1 ovs-vsctl del-port\n", "delta": "0:00:00.033500", "end": "2022-01-21 18:16:10.129597", "msg": "non-zero return code", "rc": 123, "start": "2022-01-21 18:16:10.096097", "stderr": "ovs-vsctl: 'del-port' command requires at least 1 arguments", "stderr_lines": ["ovs-vsctl: 'del-port' command requires at least 1 arguments"], "stdout": "", "stdout_lines": []}
fatal: [controller-1]: FAILED! => {"changed": true, "cmd": "ovs-vsctl list interface | awk '/name[ ]*: sp[it]-/ { print $3 }' | xargs -n1 ovs-vsctl del-port\n", "delta": "0:00:00.033568", "end": "2022-01-21 18:16:10.166465", "msg": "non-zero return code", "rc": 123, "start": "2022-01-21 18:16:10.132897", "stderr": "ovs-vsctl: 'del-port' command requires at least 1 arguments", "stderr_lines": ["ovs-vsctl: 'del-port' command requires at least 1 arguments"], "stdout": "", "stdout_lines": []}
fatal: [controller-2]: FAILED! => {"changed": true, "cmd": "ovs-vsctl list interface | awk '/name[ ]*: sp[it]-/ { print $3 }' | xargs -n1 ovs-vsctl del-port\n", "delta": "0:00:00.022305", "end": "2022-01-21 18:16:10.213384", "msg": "non-zero return code", "rc": 123, "start": "2022-01-21 18:16:10.191079", "stderr": "ovs-vsctl: 'del-port' command requires at least 1 arguments", "stderr_lines": ["ovs-vsctl: 'del-port' command requires at least 1 arguments"], "stdout": "", "stdout_lines": []}

PLAY RECAP *********************************************************************
compute-0                  : ok=24   changed=16   unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   
compute-1                  : ok=24   changed=16   unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   
controller-0               : ok=31   changed=21   unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
controller-1               : ok=26   changed=18   unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   
controller-2               : ok=26   changed=18   unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   
localhost                  : ok=14   changed=12   unreachable=0    failed=0    skipped=1    rescued=0    ignored=0   



Version-Release number of selected component (if applicable):
RHOS-16.1-RHEL-8-20220121.n.1
python3-networking-ovn-migration-tool-7.3.1-1.20220113183500.4e24f4c.el8ost.noarch.rpm

How reproducible:
Tried once and the issue occurred

Steps to Reproduce:
1. Deploy an OSP16.1 environment with ml2/ovs backend
2. Make sure that the environment does not have trunk ports
3. Try to perform migration to ml2ovs according to the official documentation

Actual results:
Migration to ovn failed on 'Cleanup neutron trunk subports' task

Expected results:
Migration to ovn succeeded without any failing task

Additional info:

Comment 4 Arnau Verdaguer 2022-03-01 14:42:56 UTC
*** Bug 2059588 has been marked as a duplicate of this bug. ***

Comment 18 errata-xmlrpc 2022-12-07 20:25:32 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 (Red Hat OpenStack Platform 16.1.9 bug fix and enhancement advisory), 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/RHBA-2022:8795