non-admins cannot show transfer by name

Bug #1884268 reported by Rajat Dhasmana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Rajat Dhasmana

Bug Description

When we try to show a volume transfer by name with non-admin user,
it shows the following error.

$ cinder --os-user-name admin transfer-show test
+--------------------------------------+--------------------------------------+------+
| ID | Volume ID | Name |
+--------------------------------------+--------------------------------------+------+
| 90b37340-4ada-456e-8644-ed22975e1dd4 | 4f8eba70-13c4-4601-8fb4-483274a7b817 | test |
+--------------------------------------+--------------------------------------+------+
$ cinder --os-user-name non_admin transfer-show test

ERROR: No volumetransfer with a name or ID of 'test' exists.

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

Fix proposed to branch: master
Review: https://review.opendev.org/737035

Changed in cinder:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
status: New → In Progress
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/737035
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=1f733cdf2dcf014b4391ebd733693d3cbcb1f848
Submitter: Zuul
Branch: master

commit 1f733cdf2dcf014b4391ebd733693d3cbcb1f848
Author: Rajat Dhasmana <email address hidden>
Date: Fri Jun 19 15:15:12 2020 +0000

    Fix: show volume transfer by name for non-admins

    When we try to show a volume transfer as a non-admin, it doesn't work.
    The problem is that the 'all_tenants' key isn't parsable by the DB,
    we remove it for admins but not for non-admins.
    Since all_tenants is just used to redirect to the correct db method,
    it should be removed for non-admins as well.

    Change-Id: I79362ee6b819c6472fa5e69ea1a85a1185dda5a3
    Closes-Bug: #1884268

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/748752

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

Reviewed: https://review.opendev.org/748752
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b8c6fcb1bc9e7497ac87563a0e738e5dfd9cc7b4
Submitter: Zuul
Branch: stable/ussuri

commit b8c6fcb1bc9e7497ac87563a0e738e5dfd9cc7b4
Author: Rajat Dhasmana <email address hidden>
Date: Fri Jun 19 15:15:12 2020 +0000

    Fix: show volume transfer by name for non-admins

    When we try to show a volume transfer as a non-admin, it doesn't work.
    The problem is that the 'all_tenants' key isn't parsable by the DB,
    we remove it for admins but not for non-admins.
    Since all_tenants is just used to redirect to the correct db method,
    it should be removed for non-admins as well.

    Change-Id: I79362ee6b819c6472fa5e69ea1a85a1185dda5a3
    Closes-Bug: #1884268
    (cherry picked from commit 1f733cdf2dcf014b4391ebd733693d3cbcb1f848)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/759061

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

Reviewed: https://review.opendev.org/759061
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=0dbbbbb0563e58b9e3cf3ba895cfc95fee81faf7
Submitter: Zuul
Branch: stable/train

commit 0dbbbbb0563e58b9e3cf3ba895cfc95fee81faf7
Author: Rajat Dhasmana <email address hidden>
Date: Fri Jun 19 15:15:12 2020 +0000

    Fix: show volume transfer by name for non-admins

    When we try to show a volume transfer as a non-admin, it doesn't work.
    The problem is that the 'all_tenants' key isn't parsable by the DB,
    we remove it for admins but not for non-admins.
    Since all_tenants is just used to redirect to the correct db method,
    it should be removed for non-admins as well.

    Change-Id: I79362ee6b819c6472fa5e69ea1a85a1185dda5a3
    Closes-Bug: #1884268
    (cherry picked from commit 1f733cdf2dcf014b4391ebd733693d3cbcb1f848)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 15.4.1

This issue was fixed in the openstack/cinder 15.4.1 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.