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

Bug 2051560

Summary: [OSP16.2] 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.2 (Train)CC: apevec, averdagu, ekuris, eolivare, jlibosva, lhh, majopela, scohen
Target Milestone: z3Keywords: AutomationBlocker, Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-networking-ovn-7.4.2-2.20220212165253.37961f4.el8osttrunk Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 2044341 Environment:
Last Closed: 2022-06-22 16:03:29 UTC Type: ---
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: 2044341    
Bug Blocks:    

Description Roman Safronov 2022-02-07 13:55:25 UTC
+++ This bug was initially created as a clone of Bug #2044341 +++

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 04 February 2022  08:14:38 +0000 (0:00:01.343)       0:44:02.791 ******* 
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.023969", "end": "2022-02-04 08:14:38.698479", "msg": "non-zero return code", "rc": 123, "start": "2022-02-04 08:14:38.674510", "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-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.021341", "end": "2022-02-04 08:14:38.726020", "msg": "non-zero return code", "rc": 123, "start": "2022-02-04 08:14:38.704679", "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.027640", "end": "2022-02-04 08:14:39.018452", "msg": "non-zero return code", "rc": 123, "start": "2022-02-04 08:14:38.990812", "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.038270", "end": "2022-02-04 08:14:39.037194", "msg": "non-zero return code", "rc": 123, "start": "2022-02-04 08:14:38.998924", "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.035111", "end": "2022-02-04 08:14:39.168592", "msg": "non-zero return code", "rc": 123, "start": "2022-02-04 08:14:39.133481", "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.2-RHEL-8-20220201.n.1
python3-networking-ovn-migration-tool-7.4.2-2.20220113214852.a2eba10.el8ost.noarch

How reproducible:
Tried once and the issue occurred

Steps to Reproduce:
1. Deploy an OSP16.2 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

Comment 5 Roman Safronov 2022-05-04 12:14:51 UTC
Verified on RHOS-16.2-RHEL-8-20220427.n.3 with python3-networking-ovn-migration-tool-7.4.2-2.20220409154847.el8ost.noarch.
Performed migration to OVN from an OVS environment with workload VMs running but there were no existing trunk ports. The migration passed successfully. The task "Check if neutron trunk subports need cleanup" detected that there are no trunk ports and therefore trunk ports cleanup was not needed and the next task (Cleanup neutron trunk subports) was skipped.

Comment 10 errata-xmlrpc 2022-06-22 16:03:29 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 16.2.3 (Train)), 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:4793