Duplicate security group name cause fail to start instance

Bug #1289195 reported by Lee Li on 2014-03-07
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Low
Unassigned

Bug Description

When create a security group, the duplicate name is allowed.
In create a instance, duplicate sg name will cause exception and the instance will be started fail. So the duplicate name of sg should be not allowed.

In nova.network.neutronv2.API:allocate_for_instance
for security_group in security_groups:
    name_match = None
    uuid_match = None
    for user_security_group in user_security_groups:
        if user_security_group['name'] == security_group: # if have duplicate sg name, the name_match will not be None for the second matching.
            if name_match:
                raise exception.NoUniqueMatch(
                    _("Multiple security groups found matching"
                       " '%s'. Use an ID to be more specific.") %
                    security_group)

            name_match = user_security_group['id']
        if user_security_group['id'] == security_group:
            uuid_match = user_security_group['id']

Lee Li (lilinguo) on 2014-03-07
Changed in neutron:
assignee: nobody → Lee Li (lilinguo)
Lee Li (lilinguo) on 2014-03-07
information type: Private Security → Public

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

Changed in neutron:
status: New → In Progress
Lee Li (lilinguo) on 2014-03-11
description: updated
description: updated
summary: - The duplicate security group name cause don't know witch security group
- use in instance
+ Duplicate security group name cause fail to start instance
yong sheng gong (gongysh) wrote :

It reads well: please use ID in this case!

yong sheng gong (gongysh) wrote :

If the ID will cover this case, I think the bug is invalid!

Changed in neutron:
status: In Progress → Opinion
Xurong Yang (idopra) wrote :

It should be using UUID instead of 'name' such as network_id port_id as name(not the key) can't differentiate security groups. so i think we should fix it in nova.

Changed in nova:
assignee: nobody → Xurong Yang (idopra)
status: New → In Progress
Changed in neutron:
status: Opinion → Invalid
Lee Li (lilinguo) on 2014-04-01
no longer affects: neutron
Aaron Rosen (arosen) on 2014-04-01
tags: added: network
removed: duplicate group name security
Tracy Jones (tjones-i) wrote :

this has not been touched in a long time and the patches are abandoned. Please set back to in progress if you start to work on it

Changed in nova:
status: In Progress → Triaged
Changed in nova:
importance: Undecided → Low
Sean Dague (sdague) on 2015-03-30
tags: added: neutron
Changed in nova:
status: Triaged → Confirmed
Changed in nova:
assignee: Xurong Yang (idopra) → Radomir Dopieralski (thesheep)
status: Confirmed → In Progress
Changed in nova:
assignee: Radomir Dopieralski (thesheep) → nobody
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Abhilash Goyal (abhilash-goyal)

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

Changed in nova:
status: Confirmed → In Progress

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/217292
Reason: This code hasn't been updated in a long time, and is in merge conflict. I am going to abandon this review, but feel free to restore it if you're still working on this.

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/310683
Reason: This patch has been sitting unchanged for more than 12 weeks. I am therefore going to abandon it to keep the nova review queue sane. Please feel free to restore the change if you're still working on it.

Anusha Unnam (anusha-unnam) wrote :

Since the patch is abondoned removing the assignee. Lee if you still want to work on this bug please reassign it to yourself and push a patch for it.

Changed in nova:
assignee: Abhilash Goyal (abhilash-goyal) → nobody
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Ravali Gudipati (ravali.gudipati)
Sean Dague (sdague) on 2017-06-23
Changed in nova:
assignee: Ravali Gudipati (ravali.gudipati) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers