After ml2/ovs to ml2/networking-ovn migration neutron resources are left on the database

Bug #1804194 reported by Miguel Angel Ajo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Undecided
Miguel Angel Ajo

Bug Description

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

Changed in networking-ovn:
assignee: nobody → Miguel Angel Ajo (mangelajo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (master)

Fix proposed to branch: master
Review: https://review.openstack.org/618983

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/618983
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=4ea65133984caec42906c0566dd751f593ca8711
Submitter: Zuul
Branch: master

commit 4ea65133984caec42906c0566dd751f593ca8711
Author: Miguel Angel Ajo <email address hidden>
Date: Tue Nov 20 11:33:12 2018 +0100

    Fix neutron resource cleanup after ml2/ovs migration

    The migration script "delete-neutron-resources" was being
    executed on controller-0 instead of the undercloud node regardless
    of the defer_to:localhost ansible setting.

    In that controller ~/overcloudrc does not exist, so the cleanup
    was failing silently.

    This commit moves the cleanup to a separate role that we tie
    to localhost (undercloud) from ovn-migration.yml

    Closes-Bug: #1804194

    Change-Id: I05f2411604ba01d170440ac655491a624f98aafc

Changed in networking-ovn:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/619226

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/rocky)

Reviewed: https://review.openstack.org/619226
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=5979cca6bc656bd4f449388c055167d8a7dd6c4d
Submitter: Zuul
Branch: stable/rocky

commit 5979cca6bc656bd4f449388c055167d8a7dd6c4d
Author: Miguel Angel Ajo <email address hidden>
Date: Tue Nov 20 11:33:12 2018 +0100

    Fix neutron resource cleanup after ml2/ovs migration

    The migration script "delete-neutron-resources" was being
    executed on controller-0 instead of the undercloud node regardless
    of the defer_to:localhost ansible setting.

    In that controller ~/overcloudrc does not exist, so the cleanup
    was failing silently.

    This commit moves the cleanup to a separate role that we tie
    to localhost (undercloud) from ovn-migration.yml

    Closes-Bug: #1804194

    Change-Id: I05f2411604ba01d170440ac655491a624f98aafc
    (cherry picked from commit 4ea65133984caec42906c0566dd751f593ca8711)

tags: added: in-stable-rocky
tags: added: networking-ovn-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 6.0.0.0b1

This issue was fixed in the openstack/networking-ovn 6.0.0.0b1 development milestone.

tags: removed: networking-ovn-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 5.1.0

This issue was fixed in the openstack/networking-ovn 5.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.