Description of problem: when the last vm of a network in a compute in migrated with DVR enable, the qrouter namespace is not deleted Version-Release number of selected component (if applicable): OSP14 How reproducible: test bed with 2 or more computes Deploy a network with a distributed router and a vm Steps to Reproduce: 1. Migrate the vm Actual results: The qrouter is not deleted in the compute when the vm is created when it is migrated. Expected results: the qrouter shoud be deleted Additional info: overcloud) [stack@undercloud-0 ~]$ openstack server show a59815b1-9b5b-4d2f-a0f3-16b99b1c82ea +-------------------------------------+----------------------------------------------------------+ | Field | Value | +-------------------------------------+----------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | compute-0.localdomain | | OS-EXT-SRV-ATTR:hypervisor_hostname | compute-0.localdomain | | OS-EXT-SRV-ATTR:instance_name | instance-00000089 | | OS-EXT-STS:power_state | Running | | OS-EXT-STS:task_state | migrating | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2019-03-07T16:19:10.000000 | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | selfservice=10.1.0.12, 10.0.0.215 | | config_drive | | | created | 2019-03-07T16:18:55Z | | flavor | cirros (0) | | hostId | 3a082c033f4bff7bb267aee72ed3cd36bfb670f164ae37e3ab5a65f6 | | id | a59815b1-9b5b-4d2f-a0f3-16b99b1c82ea | | image | cirros (10fb27dc-7894-4fc1-95ec-443b74077a73) | | key_name | mykey | | name | provider-instance3 | | progress | 0 | | project_id | 0dcb502bdb6f4f3683c51557b443168e | | properties | | | security_groups | name='default' | | status | MIGRATING | | updated | 2019-03-07T16:24:06Z | | user_id | 47bb2cdfa9734038a2a3f2e5cc1876e6 | | volumes_attached | | +-------------------------------------+----------------------------------------------------------+ [root@compute-0 heat-admin]# virsh list Id Name State ---------------------------------------------------- 14 instance-00000089 running [root@compute-0 heat-admin]# ip nentns Object "nentns" is unknown, try "ip help". [root@compute-0 heat-admin]# ip netns qrouter-80ef0dfc-ca3c-4e7c-8db4-e8982cc7699a (id: 0) fip-edda7853-cf14-4856-9850-afd04c8e2e13 (id: 1) [root@compute-0 heat-admin]# ip nentns (overcloud) [stack@undercloud-0 ~]$ nova live-migration a59815b1-9b5b-4d2f-a0f3-16b99b1c82ea (overcloud) [stack@undercloud-0 ~]$ openstack server show a59815b1-9b5b-4d2f-a0f3-16b99b1c82ea +-------------------------------------+----------------------------------------------------------+ | Field | Value | +-------------------------------------+----------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | compute-2.localdomain | | OS-EXT-SRV-ATTR:hypervisor_hostname | compute-2.localdomain | | OS-EXT-SRV-ATTR:instance_name | instance-00000089 | | OS-EXT-STS:power_state | Running | | OS-EXT-STS:task_state | None | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2019-03-07T16:19:10.000000 | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | selfservice=10.1.0.12, 10.0.0.215 | | config_drive | | | created | 2019-03-07T16:18:55Z | | flavor | cirros (0) | | hostId | de406aa667510aae422503b79d80663cd48c126a810292af891404d5 | | id | a59815b1-9b5b-4d2f-a0f3-16b99b1c82ea | | image | cirros (10fb27dc-7894-4fc1-95ec-443b74077a73) | | key_name | mykey | | name | provider-instance3 | | progress | 0 | | project_id | 0dcb502bdb6f4f3683c51557b443168e | | properties | | | security_groups | name='default' | | status | ACTIVE | | updated | 2019-03-07T16:24:18Z | | user_id | 47bb2cdfa9734038a2a3f2e5cc1876e6 | | volumes_attached | | +-------------------------------------+----------------------------------------------------------+ [root@compute-0 heat-admin]# virsh list Id Name State ---------------------------------------------------- [root@compute-0 heat-admin]# ip netns qrouter-80ef0dfc-ca3c-4e7c-8db4-e8982cc7699a (id: 0) fip-edda7853-cf14-4856-9850-afd04c8e2e13 (id: 1) [root@compute-0 heat-admin]#
It looks like this issue is caused by multiple port binding feature. It happens like that because in https://github.com/openstack/neutron/blob/c21d922abd1208a72fe64d404a8eab93e0c56870/neutron/db/l3_dvrscheduler_db.py#L438 port is still visible on old host as INACTIVE. But ports in such state aren't filtered out from the list, so there is still serviceable port on old host and there is no any router to remove found. I need to confirm it on OSP-13 but it looks like it is an regression in OSP-14
Patch merged u/s https://review.opendev.org/#/c/657556/
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, 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-2019:3750