terraform cannot remove securiygroup

Bug #1537978 reported by Bent Terp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

[bent@localhost Terraform]$ terraform apply ; date
openstack_compute_keypair_v2.terpstack: Refreshing state... (ID: terpstack)
openstack_compute_floatingip_v2.floatip_jenkins: Refreshing state... (ID: 71e4e06c-9bd3-415d-a424-39548e739215)
openstack_compute_secgroup_v2.tf_secgroup_8080: Refreshing state... (ID: dca1ae84-4fae-4fa7-86b5-5aa8e14bb25f)
openstack_networking_network_v2.tf_network_1: Refreshing state... (ID: 7a2f37bd-d345-44dc-af5f-8ef173d5b5c9)
openstack_compute_secgroup_v2.tf_secgroup_ssh: Refreshing state... (ID: 4c09f8ee-9995-4a79-ac0e-6c2961779acd)
openstack_compute_floatingip_v2.floatip_cislave: Refreshing state... (ID: 3d4c9be0-5c92-45ac-b722-a36b7632209e)
openstack_networking_subnet_v2.tf_subnet_1: Refreshing state... (ID: 10c14ed1-7d7d-45d1-b7f1-de88706b46b6)
openstack_networking_router_interface_v2.router_interface_1: Refreshing state... (ID: 8f07fafc-8b6b-465b-854d-e4aa12ba133e)
openstack_compute_instance_v2.cislave: Refreshing state... (ID: 896fe5e4-000f-4c0b-ac97-5164de45bda0)
openstack_compute_instance_v2.jenkins: Refreshing state... (ID: c3c4293d-cc7c-420d-a63b-21c0d0f7d016)
openstack_compute_instance_v2.cislave: Modifying...
  security_groups.#: "1" => "2"
  security_groups.3263659117: "tf_secgroup_ssh" => ""
  security_groups.3283219898: "" => "4c09f8ee-9995-4a79-ac0e-6c2961779acd"
  security_groups.3297268336: "" => "dca1ae84-4fae-4fa7-86b5-5aa8e14bb25f"
openstack_compute_instance_v2.jenkins: Modifying...
  security_groups.#: "1" => "2"
  security_groups.3263659117: "tf_secgroup_ssh" => ""
  security_groups.3283219898: "" => "4c09f8ee-9995-4a79-ac0e-6c2961779acd"
  security_groups.3297268336: "" => "dca1ae84-4fae-4fa7-86b5-5aa8e14bb25f"
Error applying plan:

2 error(s) occurred:

* openstack_compute_instance_v2.cislave: Error removing security group from OpenStack server (896fe5e4-000f-4c0b-ac97-5164de45bda0): Expected HTTP response code [201 202] when accessing [POST http://172.29.92.11:8774/v2/a4ecf18a0d3f42ca80bb48b71180381c/servers/896fe5e4-000f-4c0b-ac97-5164de45bda0/action], but got 500 instead
{"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'neutronclient.common.exceptions.NeutronClientNoUniqueMatch'>", "code": 500}}
* openstack_compute_instance_v2.jenkins: Error removing security group from OpenStack server (c3c4293d-cc7c-420d-a63b-21c0d0f7d016): Expected HTTP response code [201 202] when accessing [POST http://172.29.92.11:8774/v2/a4ecf18a0d3f42ca80bb48b71180381c/servers/c3c4293d-cc7c-420d-a63b-21c0d0f7d016/action], but got 500 instead
{"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'neutronclient.common.exceptions.NeutronClientNoUniqueMatch'>", "code": 500}}

2016-01-26 05:30:06.073 2877 INFO nova.osapi_compute.wsgi.server [req-ea7acb95-1b3e-43ca-b562-ead12bfa3884 70f24b8eab0a4859ae4d7ac6fcdd92f6 a4ecf18a0d3f42ca80bb48b71180
381c - - -] 172.29.99.254 "GET /v2/a4ecf18a0d3f42ca80bb48b71180381c/servers/c3c4293d-cc7c-420d-a63b-21c0d0f7d016/os-volume_attachments HTTP/1.1" status: 200 len: 370 ti
me: 0.1130500
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions [req-0d36e727-520c-4181-8cfb-4e684dcafa3c 70f24b8eab0a4859ae4d7ac6fcdd92f6 a4ecf18a0d3f42ca80bb48b71180
381c - - -] Unexpected exception in API method
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 478, in wrapped
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions return f(*args, **kwargs)
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/security_groups.py", line 417, in _removeSecurityGroup
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions context, id, group_name)
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/security_groups.py", line 384, in _invoke
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions method(context, instance, group_name)
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 234, in wrapped
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions return func(self, context, target, *args, **kwargs)
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/network/security_group/neutron_driver.py", line 496, in remove_from_instance
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions context.project_id)
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 133, in find_resourceid_by_name_or_id
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions parent_id, fields='id')['id']
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 125, in find_resource_by_name_or_id
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions fields)
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 104, in _find_resource_by_name
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions name=name)
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions NeutronClientNoUniqueMatch: Multiple security_group matches found for name 'tf_secgroup_ssh', use an ID to be more specific.
2016-01-26 05:30:07.104 2877 ERROR nova.api.openstack.extensions
2016-01-26 05:30:07.114 2877 INFO nova.api.openstack.wsgi [req-0d36e727-520c-4181-8cfb-4e684dcafa3c 70f24b8eab0a4859ae4d7ac6fcdd92f6 a4ecf18a0d3f42ca80bb48b71180381c - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'neutronclient.common.exceptions.NeutronClientNoUniqueMatch'>
2016-01-26 05:30:07.118 2877 INFO nova.osapi_compute.wsgi.server [req-0d36e727-520c-4181-8cfb-4e684dcafa3c 70f24b8eab0a4859ae4d7ac6fcdd92f6 a4ecf18a0d3f42ca80bb48b71180381c - - -] 172.29.99.254 "POST /v2/a4ecf18a0d3f42ca80bb48b71180381c/servers/896fe5e4-000f-4c0b-ac97-5164de45bda0/action HTTP/1.1" status: 500 len: 439 time: 0.6821101
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions [req-7b7bab92-a1ae-415c-af16-4f5aade8cd54 70f24b8eab0a4859ae4d7ac6fcdd92f6 a4ecf18a0d3f42ca80bb48b71180381c - - -] Unexpected exception in API method
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 478, in wrapped
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions return f(*args, **kwargs)
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/security_groups.py", line 417, in _removeSecurityGroup
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions context, id, group_name)
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/security_groups.py", line 384, in _invoke
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions method(context, instance, group_name)
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 234, in wrapped
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions return func(self, context, target, *args, **kwargs)
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/network/security_group/neutron_driver.py", line 496, in remove_from_instance
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions context.project_id)
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 133, in find_resourceid_by_name_or_id
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions parent_id, fields='id')['id']
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 125, in find_resource_by_name_or_id
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions fields)
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 104, in _find_resource_by_name
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions name=name)
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions NeutronClientNoUniqueMatch: Multiple security_group matches found for name 'tf_secgroup_ssh', use an ID to be more specific.
2016-01-26 05:30:07.164 2879 ERROR nova.api.openstack.extensions
2016-01-26 05:30:07.174 2879 INFO nova.api.openstack.wsgi [req-7b7bab92-a1ae-415c-af16-4f5aade8cd54 70f24b8eab0a4859ae4d7ac6fcdd92f6 a4ecf18a0d3f42ca80bb48b71180381c - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'neutronclient.common.exceptions.NeutronClientNoUniqueMatch'>

Revision history for this message
Bent Terp (t-bent) wrote :

Could be that there is a nova bug in here, but I could at least work around it by making my Terraform templates refer to the security groups by name rather than by ID.

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.