Bug 1651523 - [OVN Migration] after migration, openstack network agent list command display neutron agent
Summary: [OVN Migration] after migration, openstack network agent list command display...
Status: CLOSED DUPLICATE of bug 1828889
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
Target Milestone: z2
: 16.0 (Train on RHEL 8.1)
Assignee: Miguel Angel Ajo
QA Contact: Roman Safronov
Depends On:
TreeView+ depends on / blocked
Reported: 2018-11-20 09:30 UTC by Eran Kuris
Modified: 2020-09-08 14:01 UTC (History)
5 users (show)

Fixed In Version: python-networking-ovn-7.1.0-0.20200129045656.844540e.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2020-09-08 14:01:11 UTC
Target Upstream Version:

Attachments (Terms of Use)
migration log (645.25 KB, text/plain)
2018-11-20 09:30 UTC, Eran Kuris
no flags Details

System ID Private Priority Status Summary Last Updated
Launchpad 1804194 0 None None None 2018-11-20 11:05:39 UTC
OpenStack gerrit 618983 0 'None' MERGED Fix neutron resource cleanup after ml2/ovs migration 2020-12-17 12:01:36 UTC

Description Eran Kuris 2018-11-20 09:30:05 UTC
Created attachment 1507386 [details]
migration log

Description of problem:
After ovn migration completed I check the output of OpenStack network agent list
and it looks like we can see the legacy neutron agent. They are not alive but still, I expected that they will not display in OVN deployment after migration process performed.

Ansible  [migration: Deleting the neutron agents] actually ran in the controller-0. it is expected to be run in localhost (i.e undercloud)

TASK [migration : Generate neutron resources cleanup script] **********************************************************************************************************************************
task path: /home/stack/ovn_migration/playbooks/roles/migration/tasks/delete-neutron-resources.yml:12
Monday 19 November 2018  11:17:31 -0500 (0:00:00.586)       1:06:27.269 *******
META: noop
META: noop
META: noop
META: noop
changed: [controller-0] => {"changed": true, "checksum": "fd0d852ef79dfbe3c5384eecce8fec53579acf6c", "dest": "/home/stack/ovn_migration/delete_neutron_resources/delete-neutron-resources.sh", "gid": 0, "group": "root", "md5sum": "9f41d4008b512c54b2ffbf84a1b8cb4f", "mode": "0744", "owner": "root", "secontext": "unconfined_u:object_r:user_home_t:s0", "size": 551, "src": "/home/heat-admin/.ansible/tmp/ansible-tmp-1542644251.88-161854948129152/source", "state": "file", "uid": 0}

TASK [migration : Deleting the neutron agents] ************************************************************************************************************************************************
task path: /home/stack/ovn_migration/playbooks/roles/migration/tasks/delete-neutron-resources.yml:18
Monday 19 November 2018  11:17:32 -0500 (0:00:01.061)       1:06:28.330 *******
META: noop
META: noop
META: noop
META: noop
changed: [controller-0] => {"changed": true, "cmd": "/home/stack/ovn_migration/delete_neutron_resources/delete-neutron-resources.sh 2>&1 > /home/stack/ovn_migration/delete_neutron_resources/delete-neutron-resources.sh.log", "delta": "0:00:01.479081", "end": "2018-11-19 16:17:34.880606", "rc": 0, "start": "2018-11-19 16:17:33.401525", "stderr": "", "stderr_lines": [], "stdout": "+ source /home/stack/overcloudrc\n/home/stack/ovn_migration/delete_neutron_resources/delete-neutron-resources.sh: line 5: /home/stack/overcloudrc: No such file or directory\n++ openstack network agent list\n++ awk '{print $2}'\n++ grep neutron-\nMissing value auth-url required for auth plugin password\n++ openstack network list\n++ awk '{print $2}'\n++ grep 'HA network tenant'\nMissing value auth-url required for auth plugin password\n+ exit 0", "stdout_lines": ["+ source /home/stack/overcloudrc", "/home/stack/ovn_migration/delete_neutron_resources/delete-neutron-resources.sh: line 5: /home/stack/overcloudrc: No such file or directory", "++ openstack network agent list", "++ awk '{print $2}'", "++ grep neutron-", "Missing value auth-url required for auth plugin password", "++ openstack network list", "++ awk '{print $2}'", "++ grep 'HA network tenant'", "Missing value auth-url required for auth plugin password", "+ exit 0"]}
META: ran handlers
META: ran handlers

Version-Release number of selected component (if applicable):
osp14 14.0-RHEL-7/2018-11-13.1

How reproducible:

Steps to Reproduce:
1.run ovn migration 
2.run the command:
 openstack network agent list

Actual results:

Expected results:

Additional info:

Comment 1 Miguel Angel Ajo 2018-11-20 09:36:07 UTC
Working on this cone

Comment 2 Miguel Angel Ajo 2018-11-20 10:02:16 UTC
Workaround for this after migration, from the undercloud, this can be ran:

source ~/overcloudrc

# Delete neutron agents
for i in `openstack network agent list | grep neutron- | awk {'print $2'}`
  openstack network agent delete $i

delete_network_ports() {
    for p in `openstack port list --network $net_id | grep -v ID | awk '{print $2}'`
        openstack port delete $p

# Delete HA networks and ports
for i in `openstack network list | grep "HA network tenant" | awk '{print $2}'`
    delete_network_ports $i
    openstack network delete $i

Comment 4 Miguel Angel Ajo 2018-11-21 12:02:07 UTC
Merged upstream.

Comment 8 Lon Hohberger 2020-03-03 11:40:07 UTC
According to our records, this should be resolved by python-networking-ovn-7.1.0-0.20200204065607.57ac389.el8ost.  This build is available now.

Comment 9 Roman Safronov 2020-09-08 14:01:11 UTC
It was tested on RHOS-16.1-RHEL-8-20200831.n.1, deletion of neutron agents initiated as expected but it fails due to bz1828889.

*** This bug has been marked as a duplicate of bug 1828889 ***

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