500 error on delete a bay created by another user

Bug #1552457 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Hua Wang

Bug Description

To reproduce the error:

$ source /opt/stack/devstack/openrc demo demo
$ magnum bay-create --baymodel swarmbaymodel --name swarmbay
# wait for the creation to complete
$ export OS_USERNAME=admin # switch user
$ magnum bay-delete swarmbay
Delete for bay swarmbay failed: Failed to delete trust 97109cfabbe241cc9415adfee5caf907. (HTTP 500)

There are two options to fix it:
1. Allow bay created by a user deleted by another user
2. Don't allow #1, but throw a 400 error instead (not 500)

Changed in magnum:
assignee: nobody → HouMing Wang (houming-wang)
Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by HouMing Wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/289220
Reason: There is another patch(https://review.openstack.org/#/c/289656/) can fix this issue, abandon it.

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

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

Changed in magnum:
assignee: HouMing Wang (houming-wang) → Hua Wang (humble00)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by HouMing Wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/289220
Reason: Fix by this patch: https://review.openstack.org/#/c/293371/

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

Reviewed: https://review.openstack.org/293371
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=e79d4a182f7a741e61e3d2aa6be9349c5e456200
Submitter: Jenkins
Branch: master

commit e79d4a182f7a741e61e3d2aa6be9349c5e456200
Author: Hua Wang <email address hidden>
Date: Wed Mar 16 18:54:51 2016 +0800

    Bay can not be deleted by other users in the same project

    Trust can only be deleted by the user who creates it. So when
    other users in the same project want to delete the bay, we need
    use the trustee which can impersonate the trustor to delete the
    trust.

    Change-Id: I9f87cdf07066d316722e798cd0755f0fff5c2a02
    Closes-Bug: #1552457

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

This issue was fixed in the openstack/magnum 3.0.0 release.

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.