Bug 1637463

Summary: Heat delete does not work if router has more than one subnet interface attached
Product: Red Hat OpenStack Reporter: Fabrizio Soppelsa <fsoppels>
Component: openstack-neutronAssignee: Brian Haley <bhaley>
Status: CLOSED ERRATA QA Contact: Candido Campos <ccamposr>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: aguetta, amuller, bhaley, ccamposr, chrisw, mburns, ragiman, ramishra, sbaker, shardy
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-9.4.1-37.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-30 16:58:15 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 Fabrizio Soppelsa 2018-10-09 10:13:06 UTC
Description of problem:
Heat delete does not work if router has more than one subnet interface attached

Version-Release number of selected component (if applicable):
10

How reproducible:
Delete a stack like this:

...
  cfme_router:
    type: OS::Neutron::Router
    properties:
      admin_state_up: true
      name: cfme_router
      external_gateway_info:
        network: { get_param: public_net }
        
  cfme_router_int0:
    type: OS::Neutron::RouterInterface
    properties:
      router_id: { get_resource: cfme_router }
      subnet_id: { get_resource: cfme_subnet_internal }
      
  cfme_router_int2:
    type: OS::Neutron::RouterInterface
    properties:
      router_id: { get_resource: cfme_router }
      subnet_id: { get_resource: cfme_subnet_internal2 }
      
  cfme_router_int3:
    type: OS::Neutron::RouterInterface
    properties:
      router_id: { get_resource: cfme_router }
      subnet_id: { get_resource: cfme_subnet_internal3 }

Actual results:
Failure with:

    2018-10-02 16:21:10.404 789127 ERROR heat.engine.resource Conflict: Unable to complete operation on subnet a366bb7e-bd1f-477e-8f36-0efadfbded49: One or more ports have an IP allocation from this subnet.

Expected results:
Stack deleted and all resources wiped correctly.

Additional info:
Not sure this is an expected behavior.

Comment 2 Rabi Mishra 2018-10-10 05:16:19 UTC
Looks like https://bugs.launchpad.net/heat/+bug/1709774. It's neutron DVR issue where multiple csnat ports are created (retries if one is down) and not deleted when the router is deleted.

Fixed in queens upstream, but does not look like it's backported beyond pike (RHOS12).

Comment 3 Fabrizio Soppelsa 2018-10-15 09:16:32 UTC
Hi Rabi,
ack. Do you know if we can workaround/mitigate this, and how?

Comment 33 errata-xmlrpc 2019-04-30 16:58:15 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://access.redhat.com/errata/RHSA-2019:0916