project cleanup does not resolve ports with security groups

Bug #2054559 reported by C Stein
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Alexey Stupnikov

Bug Description

The project cleanup command is unable to delete Ports/security groups with security groups/ports still attached to them, and it does not resolve this situation properly

Environment:
- python-openstackclient version: 6.4.0

Steps to Reproduce:

The following terraform configuration deploys three resources:
- a network
- a port
- a security group, linked to said port

```terraform
resource "openstack_networking_secgroup_v2" "secgroup_1" {
  name = "secgroup_1"
  description = "My neutron security group"
}

resource "openstack_networking_network_v2" "network_1" {
  name = "network_1"
  admin_state_up = "true"
}

resource "openstack_networking_port_v2" "port_1" {
  name = "port_1"
  network_id = openstack_networking_network_v2.network_1.id
  admin_state_up = true
  security_group_ids = [openstack_networking_secgroup_v2.secgroup_1.id]
}
```

When trying to remove these resources it fails to do so, with the following error:

openstack.exceptions.ConflictException: ConflictException: 409: Client Error for url: https://url:9696/v2.0/security-groups/84b9793c-c970-476f-a581-47b872a06a04, Security Group 84b9793c-c970-476f-a581-47b872a06a04 in use.

Expected Behavior:
Ressources should be removed

Actual Behavior:
Security groups are not successfully remove when attached to a port.

Revision history for this message
C Stein (cstein-plusserver) wrote :

This is essentially the same behavior as described here:
https://storyboard.openstack.org/#!/story/2010316

description: updated
Revision history for this message
yosef (yosex) wrote :

This must be placed on openstacksdk

Revision history for this message
Fabian Schuetz (veith4f) wrote :

Should close this. Implementation of project cleanup is here:
https://github.com/openstack/openstacksdk/blob/master/openstack/cloud/openstackcloud.py#L637

Changed in python-openstackclient:
assignee: nobody → Alexey Stupnikov (astupnikov)
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.