port resource residue

Bug #1358581 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
huangtianhua

Bug Description

1. create a stack with AWS::EC2::Instance resource and specified the "SubnetId"
2. heat will call neutronclient to create a port in _build_nics() function
3. then heat call novaclient to create a server, it was failed in nova-scheduling, and the stack is CREATE_FAILED
4. delete the stack, heat won't to delete the port, just to call novaclient to delete the server, and if server creation is failed in scheduling, nova can't delete the port.
5. And also see the nova patch https://review.openstack.org/#/c/77043/, it will not delete the port if the port was passed in via the api.

May be there are other resources which be implicit-created by heat, but heat won't delete them.
Is there any good way to solve?

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
Steve Baker (steve-stevebaker) wrote : Re: [Bug 1358581] [NEW] port resource residue

On 19/08/14 15:59, huangtianhua wrote:
> Public bug reported:
>
> 1. create a stack with AWS::EC2::Instance resource and specified the "SubnetId"
> 2. heat will call neutronclient to create a port in _build_nics() function
> 3. then heat call novaclient to create a server, it was failed in nova-scheduling, and the stack is CREATE_FAILED
> 4. delete the stack, heat won't to delete the port, just to call novaclient to delete the server, and if server creation is failed in scheduling, nova can't delete the port.
Suggested fix for this is to store the created port ID in the instance
resource_data, then delete the port on resource delete.
> 5. And also see the nova patch https://review.openstack.org/#/c/77043/, it will not delete the port if the port was passed in via the api.
That is a separate issue caused by nova/neutron interaction, but it does
affect heat.
> May be there are other resources which be implicit-created by heat, but heat won't delete them.
> Is there any good way to solve?
We generally do a good job of deleting implicitly created resources.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/115234
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=9a9a140af67c309ab90384b61d18a81542168320
Submitter: Jenkins
Branch: master

commit 9a9a140af67c309ab90384b61d18a81542168320
Author: huangtianhua <email address hidden>
Date: Tue Aug 19 15:57:27 2014 +0800

    Fix port residue when instance deletion

    A port be implicit-created on ec2 instance creation
    if only specify 'SubnetId', so the port id needs to
    be stored in instance resource_data so that the port
    can be deleted on instance deletion.

    Change-Id: I3b685fca26397f8f47d6a732891f06a5360b6487
    Closes-bug: #1358581

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-3 → 2014.2
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.