Unique resource name check misses the tenant filter

Bug #1584680 reported by Nikita Konovalov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
High
Telles Mota Vidal Nóbrega

Bug Description

The resource name check fetches all resource instances from db and does not filter by tenant.

This may cause inability to create cluster with common names like "test" or "demo" in multiple tenants.

The checks should be updated to be tenant specific.

Steps to reproduce issue:

 1. Create PUBLIC node group template 'test' in the project 1.
 2. Switch to the project 2.
 3. Create node group template 'test' in the project 2.
 4. Expected result: node group created. Actual result: NodeGroup template with name 'test' already exists.

Changed in sahara:
assignee: nobody → Nikita Konovalov (nkonovalov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara (master)

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

Changed in sahara:
status: New → In Progress
Changed in sahara:
milestone: newton-1 → newton-2
Revision history for this message
Vitalii Gridnev (vgridnev) wrote :

It's not optimistic that it will be fixed in newton2

Changed in sahara:
milestone: newton-2 → newton-3
Changed in sahara:
milestone: newton-3 → newton-rc1
Changed in sahara:
milestone: newton-rc1 → next
milestone: next → newton-rc1
Changed in sahara:
milestone: newton-rc1 → ocata-1
Changed in sahara:
milestone: ocata-1 → ocata-2
Changed in sahara:
assignee: Nikita Konovalov (nkonovalov) → nobody
Changed in sahara:
assignee: nobody → Telles Mota Vidal Nóbrega (tellesmvn)
Revision history for this message
Vitalii Gridnev (vgridnev) wrote :

Added steps to reproduce issue.

description: updated
Revision history for this message
Telles Mota Vidal Nóbrega (tellesmvn) wrote :

I believe you missed one step:

1.5 - Setting node group template to public

description: updated
Changed in sahara:
status: In Progress → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Change abandoned by Nikita Konovalov (<email address hidden>) on branch: master
Review: https://review.openstack.org/319860

Changed in sahara:
milestone: ocata-2 → ocata-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

Reviewed: https://review.openstack.org/404175
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=b9fecf9657ec018c6b551cd65382c6d3720aa13c
Submitter: Jenkins
Branch: master

commit b9fecf9657ec018c6b551cd65382c6d3720aa13c
Author: Telles Nobrega <email address hidden>
Date: Mon Dec 5 16:50:36 2016 -0300

    Adding tenant_id to regex_search

    In order to allow the creation of clusters with the same across
    projects, even when set to public, we need to filter only cluster from
    the requester's project when creating a new cluster. This will narrow
    the name check to same project only.

    Change-Id: Idd43833c71ef486cf72ebe88ff9df495fff6b809
    Partial-bug: #1584680

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

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

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

Reviewed: https://review.openstack.org/413219
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=e481549c1d9cee56e7b2dfe9f16bfca586c949e7
Submitter: Jenkins
Branch: master

commit e481549c1d9cee56e7b2dfe9f16bfca586c949e7
Author: Telles Nobrega <email address hidden>
Date: Tue Dec 20 16:48:41 2016 -0300

    Adding tenant_id to regex_search

    In order to allow the creation of clusters templates and node group
    templates with the same across projects, even when set to public, we need to
    filter only from the requester's project when creating a new resources.
    This will narrow the name check to same project only.

    Change-Id: Icc39c7e680c2fff583069a5522b2a11afb3e239b
    Closes-bug: #1584680

Changed in sahara:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara 6.0.0.0b3

This issue was fixed in the openstack/sahara 6.0.0.0b3 development milestone.

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.