Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform Destroy fails on OpenStack due to improper resource destroy order #2671

Closed
brent-is-still-here opened this issue Jul 9, 2015 · 13 comments
Labels

Comments

@brent-is-still-here
Copy link

Running Terraform Destroy against OpenStack will fail if you have used Terraform to build a router, router interface, network, subnet, and floating IPs. Terraform will destroy VMs, keys, etc. first, but instead of then destroying the floating IPs, it will attempt to destroy the router interface. This will fail as the floating IP still exists.

Error applying plan:

1 error(s) occurred:

* Error deleting OpenStack Neutron Router Interface: Expected HTTP response code [200] when accessing [PUT http://IP_ADDRESS:9696/v2.0/routers/b8ca36f7-b20c-47e6-8742-5ba4472cb523/remove_router_interface], but got 409 instead
{"NeutronError": {"message": "Router interface for subnet 3aa1d3f5-c874-4c9a-a128-d25657faf6a6 on router b8ca36f7-b20c-47e6-8742-5ba4472cb523 cannot be deleted, as it is required by one or more floating IPs.", "type": "RouterInterfaceInUseByFloatingIP", "detail": ""}}
@brent-is-still-here brent-is-still-here changed the title Terraform Destroy Fails on OpenStack due to Destroy Out of Order Terraform Destroy fails on OpenStack due to improper resource destroy order Jul 9, 2015
@boernd
Copy link

boernd commented Jul 30, 2015

Why is this issue closed? Not fixed in 0.6.1 as far as I can see?

@samdunne
Copy link
Contributor

Still having this issue. It should be reopened.

The issue also affects removing pools from a vip

@imduffy15
Copy link
Contributor

Spent a good bit of today looking at this but in the context of VIPs and Pools.

A delete request on a VIP and pool isn't instantly actioned, it is scheduled. The openstack provider doesn't poll to ensure the VIP/Pool hasn't been removed accordingly. By the time we try delete something like the router or a monitor the VIP/Pool hasn't been removed thus failure.

Removal is needed across the whole openstack provider to check where polling is required on delete.

@radeksimko @kaelumania @boernd @samdunne

@phinze
Copy link
Contributor

phinze commented Oct 30, 2015

A delete request on a VIP and pool isn't instantly actioned, it is scheduled. The openstack provider doesn't poll to ensure the VIP/Pool hasn't been removed accordingly.

@jtopjian sounds like we just need to add some polling in here, yes?

@jtopjian
Copy link
Contributor

Hi all,

#3712 might resolve this issue if anyone wants to take a look and give feedback.

@jtopjian
Copy link
Contributor

jtopjian commented Nov 3, 2015

#3712 was just merged. Please let me know if this helps.

@Fodoj
Copy link

Fodoj commented Nov 8, 2015

I believe there is still a bug here related to destroying resources that depend on Neutron Ports. I will try to compile an example in next few days.

@jtopjian
Copy link
Contributor

jtopjian commented Nov 8, 2015

@Fodoj Thanks! That would be much appreciated.

@jtopjian
Copy link
Contributor

@Fodoj any update on this one? Are you still hitting a bug?

@Fodoj
Copy link

Fodoj commented Nov 14, 2015

Yes and no :) I do still have this bug, but it's rather a bug with openstack version I use and I solved it by specifying some dependencies manually in terraform 

Best regards,
Kirill Shirinkin

On Sat, Nov 14, 2015 at 4:19 AM, Joe Topjian [email protected]
wrote:

@Fodoj any update on this one? Are you still hitting a bug?

Reply to this email directly or view it on GitHub:
#2671 (comment)

@jtopjian
Copy link
Contributor

OK, sounds good. Similar to #2343, I'm going to close this as #3712 should have fixed this. However, if that's incorrect, please re-open this issue or open a new issue. As well, if there are any other ordering/timing issues with the other resources, please let me know.

@boernd
Copy link

boernd commented Nov 18, 2015

Hi, fyi just tested with master and my issue during destroy is gone (openstack_networking_router_interface_v2.router-interface: Error deleting OpenStack Neutron Router Interface...).

Thx!

@ghost
Copy link

ghost commented Apr 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants