Duplicate security group name cause fail to start instance

Bug #1289195 reported by Lee Li
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
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)
Changed in neutron:
assignee: nobody → Lee Li (lilinguo)
Lee Li (lilinguo)
information type: Private Security → Public
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Lee Li (lilinguo)
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
Revision history for this message
yong sheng gong (gongysh) wrote :

It reads well: please use ID in this case!

Revision history for this message
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
Revision history for this message
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)
no longer affects: neutron
Aaron Rosen (arosen)
tags: added: network
removed: duplicate group name security
Revision history for this message
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)
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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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.

Revision history for this message
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)
Changed in nova:
assignee: Ravali Gudipati (ravali.gudipati) → nobody
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.