Bug 1399742

Summary: Migrating HA routers to Legacy doesn't update interface's device_owner
Product: Red Hat OpenStack Reporter: John Schwarz <jschwarz>
Component: openstack-neutronAssignee: John Schwarz <jschwarz>
Status: CLOSED ERRATA QA Contact: Toni Freger <tfreger>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: amuller, chrisw, nyechiel, srevivo, tvignaud
Target Milestone: gaKeywords: Triaged
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-9.1.0-8.el7ost Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 16:35:06 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:

Description John Schwarz 2016-11-29 15:58:03 UTC
Patch I322c392529c04aca2448fd957a35f4908b323449 added a new device_owner for HA  interfaces between a router and an internal subnet, which is used to differentiate it from normal, non-HA interfaces. However, when migrating a router from HA to legacy, the device_owner isn't switched back to its non-HA counterpart. This can cause migration of the router to DVR to not work properly as the snat interface isn't created.

A log and reproducible can be found in [1].

[1]: http://paste.openstack.org/show/590804/

Comment 1 Assaf Muller 2016-11-29 16:01:45 UTC
To expand on comment 0:

DVR is a key feature for OSP 10. We'd like to support both green field and brown field deployments, e.g. support migrating an OSP 10 deployment using HA routers to DVR. The migration of a router from HA to DVR is in two steps:

1) Migrate the HA router to "legacy"
2) Migrate the "legacy" router to DVR

Step 1 isn't working properly, essentially blocking DVR migrations. Green field deployments are not affected.

Comment 4 Toni Freger 2016-12-08 08:51:58 UTC
Tested on openstack-neutron-9.1.0-8.el7ost.noarch
3 controllers and compute 

Steps of verification:

1)HA router created and internal network attached 
<neutron router-create --ha True --distributed False  <router_ha>>

2)Port owner - network:ha_router_replicated_interface

3)Turn off admin state 
< neutron router-update <router_ha> --admin_state_up False

4)Migrate the HA router to legacy 
<neutron router-update <router_ha> --ha False>

5)Port owner  - network:router_interface 

6)Migrate the legacy router to distributed
< neutron router-update <router_ha> --distributed True>

7)Port owner - network:router_interface_distributed

8)set external gateway to the router

9) snat port appeared as expected on hosting l3 agent controller 

<neutron l3-agent-list-hosting-router <router_ha>>

controller-0.localdomain

[root@controller-0 ~]# ip netns
snat-9ccd9d16-97c5-4837-b04e-dc1c251a9ed4

Comment 6 errata-xmlrpc 2016-12-14 16:35:06 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, 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://rhn.redhat.com/errata/RHEA-2016-2948.html