reason should be shown when failing to delete a security group

Bug #1210540 reported by Tanja Roth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Triaged
Low
Vishal Manchanda

Bug Description

If you are trying to delete a security group that is assigned to an instance that is running, the security group cannot be deleted. The Dashboard only gives a generic message that the group cannot be deleted without mentioning why.
Instead of letting the user search for the reason, a specific message would be much better:

"Security Group <xyz> is still assigned to instances <abc>. You need to do <cde> before you can delete the group."

--

[amotoki]
The current consensus looks like adding a message like "Security group is still in use" on the UI. This can be done by checking the exception from openstack_dashboard.api.neutron (and neutronclient.common.exceptions). 409 means the requested security group is in use.

Tags: neutron
Revision history for this message
Ashok kumaran B (ashokkumaran-b) wrote :

Hi

Security group can be modified on the fly when the instance is running. You can either remove an old security group or add a new security group. That's pretty much possible.
if you are running grizzly you might wanna take this patch https://review.openstack.org/#/c/32679(or else you need to wait for 2013.1.3 patch release) which can solve the problem. I believe horizon got nothing much to do here.

Kieran Spear (kspear)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Low
milestone: none → next
Changed in horizon:
assignee: nobody → Verónica Musso (veronica-a-musso)
Revision history for this message
Verónica Musso (veronica-a-musso) wrote :

When user tries to delete an assigned security group, the Nova function in charge of destroying it, throws an exception with the message: "Security group is still in use" (see destroy function in nova/nova/compute/api.py). Also, the code is prepared to manage its translations.
We could add that message to the current one ("Unable to delete: group_name") when the exception is caught and the UI message is printed. The only thing to consider is that the method is general and it manages several exceptions, then we would print all the exception messages (see handle function in horizon/horizon/tables/actions.py). Is that ok?

Revision history for this message
Tanja Roth (taroth) wrote :

IMHO, a message like "Security group is still in use" on the UI would be fine.
I'm not very deeply into the code, therefore I cannot assess if printing all the exception messages on the UI could turn into a problem - I leave that that for others to judge. To me, Veronica's proposal sounds good.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/62026

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
Masco (masco) wrote : Re: Usability: Deleting a Security Group

removing the assignee since no activity for long time

Changed in horizon:
assignee: Verónica Musso (veronica-a-musso) → nobody
status: In Progress → Confirmed
Adriano (dritec)
Changed in horizon:
assignee: nobody → Adriano (dritec)
Adriano (dritec)
Changed in horizon:
assignee: Adriano (dritec) → nobody
Changed in horizon:
assignee: nobody → Jyothi Saroja (saroja-daggu)
Changed in horizon:
assignee: Jyothi Saroja (saroja-daggu) → nobody
assignee: nobody → Jyothi Saroja (saroja-daggu)
Revision history for this message
surbhi sarda (surbhisarda) wrote :

can i work on this bug?

Revision history for this message
Jyothi Saroja (saroja-daggu) wrote : Re: [Bug 1210540] Re: Usability: Deleting a Security Group

Yes, you can.
-----<email address hidden> wrote: -----
To: <email address hidden>
From: surbhi sarda <email address hidden>
Sent by: <email address hidden>
Date: 09/16/2016 11:47AM
Subject: [Bug 1210540] Re: Usability: Deleting a Security Group

can i work on this bug?

--
You received this bug notification because you are a bug assignee.
https://bugs.launchpad.net/bugs/1210540

Title:
  Usability: Deleting a Security Group

Status in OpenStack Dashboard (Horizon):
  Confirmed

Bug description:
  If you are trying to delete a security group that is assigned to an instance that is running, the security group cannot be deleted. The Dashboard only gives a generic message that the group cannot be deleted without mentioning why.
  Instead of letting the user search for the reason, a specific message would be much better:

  "Security Group <xyz> is still assigned to instances <abc>. You need
  to do <cde> before you can delete the group."

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1210540/+subscriptions
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you

Akihiro Motoki (amotoki)
summary: - Usability: Deleting a Security Group
+ reason should be shown when failing to delete a security group
description: updated
Changed in horizon:
assignee: Jyothi Saroja (saroja-daggu) → nobody
status: Confirmed → Triaged
tags: added: neutron
Changed in horizon:
assignee: nobody → Vishal Manchanda (vishalmanchanda)
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.