2

When I'm trying to delete a security group, the delete operation fails

neutron security-group-delete f54609e7-f3a3-4b44-8060-2675058ea786
Security Group f54609e7-f3a3-4b44-8060-2675058ea786 in use.

I tried to delete all security group rules and the same error message appears.

How can I release it?

MyYyY
  • 51
  • 1
  • 3
  • 9

4 Answers4

1

I have face the same issue and get solved by deleting the ports used in concered security group.

  1. neutron port-list - (Get all port list and find out concered sec group)
  2. neutron port-delete 6a63e526-164b-4e95-9a7f-ffb05c7c718b (Delete the concered port)

After clening up ports , Try to delete the concered sec group.

user378268
  • 11
  • 1
  • Just a tip, use `neutron port-list -c id -c security_groups |grep ${security-group-id}` to get all ports that are using a specific sec group. – Corey Oct 16 '20 at 02:33
0

The security group in matter was attached to a nova server. This server also had attached to it a cinder volume. This volume remained stuck in "Creating" status.

Because of this volume, the security group could not be deleted.

I've identified the problem by using

heat event-list <NAME or ID>
MyYyY
  • 51
  • 1
  • 3
  • 9
0

I have same issue, however we are using nova, I found out that security group was used on one forgotten server, then I deleted it from this server with nova:

nova list-secgroup {server_name}
nova remove-secgroup {server_name} {sec_group_id}

afterwards

openstack security group delete {sec_group_id}

was working

Jan Tancibok
  • 125
  • 1
  • 11
0

My approach to find the offending VM was

for serverid in `openstack server list -f value -c ID` ; do
   nova list-secgroup $serverid | grep $SECGROUP && echo $serverid ;
done

and then drop it with nova delete $serverid

Bernhard M.
  • 186
  • 4