Cannot create cluster in other tenant with enabled is_public

Bug #1585211 reported by Michael Ionkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
High
Michael Ionkin
Mitaka
Fix Released
High
Vitalii Gridnev

Bug Description

STEPS TO REPRODUCE:
1. Create env with sahara
2. Deploy env with sahara
3. Create new tenant, user, role
4. Login as admin user
5. Mark cluster template as public
6. Login as other user
7. Create cluster with shared template

EXPECTED RESULT:
Cluster created

ACTUAL RESULT:
Error: Internal Server Error.
In sahara-api.log I can see http://paste.openstack.org/show/497851/

Re-creation of cluster with same name failed with "Error: Duplicate entry for object vanilla-d79213558acd40f6bd84494ed7193517. Failed on columns: ['name'] Error ID: ebcf7f0e-8ea3-4f70-94c9-e100118a0989" because cluster created in admin tenant

Changed in sahara:
assignee: nobody → Michael Ionkin (msionkin)
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/320463

Changed in sahara:
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

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

commit b9b2dca4f95340d932f40e1e2be5982efbf81523
Author: Michael Ionkin <email address hidden>
Date: Mon May 23 19:29:17 2016 +0300

    Fix cluster creation with another tenant

    This patch fix cluster creation with public template that has been
    created in another tenant (not in current).
    The problem is that at the particular time configs of cluster and node
    groups are merging. And 'tenant_id' property of node group replaces the
    same property of cluster config. Therefore, further sahara db api
    cannot find this new cluster with current tenant id if node group has
    been created in another tenant.

    Change-Id: I8eaa4350ec873cca73a6e828efd54200912bacaa
    closes-bug: 1585211

Changed in sahara:
status: In Progress → Fix Released
Changed in sahara:
importance: Undecided → High
milestone: none → newton-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/324351

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

Reviewed: https://review.openstack.org/324351
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=b6729212c7f0a4668eba2f12899860e37e045e2d
Submitter: Jenkins
Branch: stable/mitaka

commit b6729212c7f0a4668eba2f12899860e37e045e2d
Author: Michael Ionkin <email address hidden>
Date: Mon May 23 19:29:17 2016 +0300

    Fix cluster creation with another tenant

    This patch fix cluster creation with public template that has been
    created in another tenant (not in current).
    The problem is that at the particular time configs of cluster and node
    groups are merging. And 'tenant_id' property of node group replaces the
    same property of cluster config. Therefore, further sahara db api
    cannot find this new cluster with current tenant id if node group has
    been created in another tenant.

    Change-Id: I8eaa4350ec873cca73a6e828efd54200912bacaa
    closes-bug: 1585211
    (cherry picked from commit b9b2dca4f95340d932f40e1e2be5982efbf81523)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/sahara 4.0.1

This issue was fixed in the openstack/sahara 4.0.1 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/sahara 5.0.0.0b2

This issue was fixed in the openstack/sahara 5.0.0.0b2 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.