failed to delete the stack due to unable to delete the NovaFloatingIPAssociation resource

Bug #1318869 reported by huangtianhua
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
huangtianhua
Icehouse
Fix Released
Medium
Steve Baker

Bug Description

failed to delete the stack due to unable to delete the NovaFloatingIPAssociation resource:

1. Create a stack with the template:
    {
  "AWSTemplateFormatVersion" : "2010-09-09",
  "Resources" : {
    "fl": {
      "Type": "OS::Nova::FloatingIP"
    },
    "as": {
      "Type": "OS::Nova::FloatingIPAssociation",
      "Properties": {
        "server_id": {"Ref" : "my_server"},
        "floating_ip": {"Ref" : "fl"}
      }
    },
    "my_server":{
      "Type": "OS::Nova::Server",
      "Properties": {
        "image": "2146dfbf-ba77-4083-8e86-d052f671ece5",
        "flavor": "m1.tiny"
      }
    }
  }
}

2. The stack created failed. Because the network is not specified, the server will created at the first public-network, so unable to associated with a floatingip. An error msg: "Unable to associate floating ip"

--------It's ok.

3. Delete the stack failed, error msg is "Floating ip 172.24.4.13 is not associated with instance".

--------It's a bug

4. If not associated why try to disassociate?

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
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/93367

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/93367
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3f82b5959e8de51d1c384b1eb981e597c2fa13e0
Submitter: Jenkins
Branch: master

commit 3f82b5959e8de51d1c384b1eb981e597c2fa13e0
Author: huangtianhua <email address hidden>
Date: Tue May 13 11:20:57 2014 +0800

    Fix failed to delete the NovaFloatingIPAssociation resource

    Unable to delete a CREATE_FAILED stack which the NovaFloatingIPAssociation
    resource create failed. So we should check if the resource is not created
    successful, don't try to delete it.

    Change-Id: I0eba68cc2d84b2c683e66c971534afe55d391949
    Closes-bug: #1318869

Changed in heat:
status: In Progress → Fix Committed
Kevin Fox (kevpn)
tags: added: icehouse-backport-potential
Revision history for this message
Kevin Fox (kevpn) wrote :
Download full text (4.8 KiB)

I see the same issue with this patch applied. Looks like /usr/lib/python2.6/site-packages/heat/engine/resources/eip.py may need a patch too.

2014-05-20 11:30:02.450 15470 INFO heat.engine.service [req-62a3a999-2c52-478b-af81-79f4cbc1dcf5 None] Deleting stack Keyserver
2014-05-20 11:30:02.537 15470 INFO heat.engine.resource [-] deleting NestedStack "Instance" [0460402e-ad5d-4c6d-a3bf-0167a4622e32] Stack "Keyserver" [cb67eec5-ba73-4aa7-b36d-20f5ef75e8e1]
2014-05-20 11:30:02.653 15470 INFO heat.engine.resource [-] deleting ElasticIpAssociation "Floating-IP" Stack "Keyserver-Instance-p7hxrwfsofht" [0460402e-ad5d-4c6d-a3bf-0167a4622e32]
2014-05-20 11:30:02.820 15470 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.122.36
2014-05-20 11:30:02.998 15470 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.122.36
2014-05-20 11:30:03.260 15470 ERROR heat.engine.resource [-] Delete ElasticIpAssociation "Floating-IP" Stack "Keyserver-Instance-p7hxrwfsofht" [0460402e-ad5d-4c6d-a3bf-0167a4622e32]
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource Traceback (most recent call last):
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resource.py", line 683, in delete
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource handle_data = self.handle_delete()
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resources/eip.py", line 241, in handle_delete
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource server.remove_floating_ip(self.properties[self.EIP])
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/v1_1/servers.py", line 130, in remove_floating_ip
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource self.manager.remove_floating_ip(self, address)
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/v1_1/servers.py", line 631, in remove_floating_ip
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource self._action('removeFloatingIp', server, {'address': address})
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/v1_1/servers.py", line 1179, in _action
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource return self.api.client.post(url, body=body)
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 286, in post
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource return self._cs_request(url, 'POST', **kwargs)
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 260, in _cs_request
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource **kwargs)
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 242, in _time_request
2014-05-20 11:30:03.260 15470 TRACE heat.engine.resource resp, body = self.request(url, method, **kwargs)
2014-05-20 11:30:03.260 15...

Read more...

Changed in heat:
importance: Undecided → Medium
milestone: none → juno-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/95924

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/icehouse)

Reviewed: https://review.openstack.org/95924
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=0f926833cb72e682ce88f45f1d3a09bb3c8d7068
Submitter: Jenkins
Branch: stable/icehouse

commit 0f926833cb72e682ce88f45f1d3a09bb3c8d7068
Author: huangtianhua <email address hidden>
Date: Tue May 13 11:20:57 2014 +0800

    Fix failed to delete the NovaFloatingIPAssociation resource

    Unable to delete a CREATE_FAILED stack which the NovaFloatingIPAssociation
    resource create failed. So we should check if the resource is not created
    successful, don't try to delete it.

    Change-Id: I0eba68cc2d84b2c683e66c971534afe55d391949
    Closes-bug: #1318869

tags: added: in-stable-icehouse
Alan Pevec (apevec)
tags: removed: icehouse-backport-potential in-stable-icehouse
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-1 → 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.