Bug 2268601 - [OSP17.1] Trying to set a default volume-type for a project gets you "ERROR: You are not authorized to perform this operation. (HTTP 403)"
Summary: [OSP17.1] Trying to set a default volume-type for a project gets you "ERROR: ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 17.1 (Wallaby)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z4
: 17.1
Assignee: Rajat Dhasmana
QA Contact: Yosi Ben Shimon
Andy Stillman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-08 15:49 UTC by ggrimaux
Modified: 2024-11-21 09:39 UTC (History)
8 users (show)

Fixed In Version: openstack-cinder-18.2.2-17.1.20240802150750.f6b44fc.el9ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-11-21 09:39:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 806991 0 None MERGED Update project personas for default_types 2024-06-05 08:12:51 UTC
Red Hat Issue Tracker OSP-31591 0 None None None 2024-03-08 15:54:25 UTC
Red Hat Product Errata RHBA-2024:9974 0 None None None 2024-11-21 09:39:44 UTC

Description ggrimaux 2024-03-08 15:49:10 UTC
Description of problem:
If you follow our documentation to set a default volume-type for a project:
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/17.0/html/storage_guide/assembly_configuring-the-block-storage-service_osp-storage-guide#proc_defining-a-project-specific-default-volume-type_configuring-cinder

You get the following error:
ERROR: You are not authorized to perform this operation. (HTTP 403) (Request-ID: req-34c564aa-d94c-447a-83b3-ad8c1ce655a0)
Even though I used overcloudrc as it says.

The only way to make it works is changing "export OS_PROJECT_NAME" to my new project, source that file and then I can set a default volume-type.
But I don't think it is the intended way.

If you are the admin you should be able to set it for any project.

I reproduced the issue in a lab.

Is it working by design or something is not implemented correctly ?
If it's by design it should become a doc bug so we tell people how to do it properly.

Version-Release number of selected component (if applicable):
OSP 17.1.2

How reproducible:
100%

Steps to Reproduce:
1. follow our documentation
2. fails
3. be disapppointed

Actual results:
Can't set default volume type for project you create while being an admin

Expected results:
Being able to create default volume-type while being admin 

Additional info:

Comment 17 Yosi Ben Shimon 2024-10-29 07:11:44 UTC
Tested on:
Red Hat Enterprise Linux release 9.2 (Plow)
Red Hat OpenStack Platform release 17.1.4 (Wallaby)
openstack-cinder-18.2.2-17.1.20240916200757.f6b44fc.el9ost.noarch

The default volume type in cinder.conf:
default_volume_type=tripleo

* Used overcloudrc
- created a new volume type and a project.
- assigned the volume type to be the default for the project
- list default volume types for the project
- unset the default volume type

(overcloud) [stack@undercloud-0 ~]$ cinder type-create --is-public True test-vol-type
(overcloud) [stack@undercloud-0 ~]$ openstack project create test-project
(overcloud) [stack@undercloud-0 ~]$ cinder --os-volume-api-version 3.62 default-type-set test-vol-type <project-id>
(overcloud) [stack@undercloud-0 ~]$ cinder --os-volume-api-version 3.62 default-type-list --project <project-id>
+----------------+--------------------------------------+
| Property       | Value                                |
+----------------+--------------------------------------+
| project_id     | 18e1a34103bd4095aad97b7bb732c37f     |
| volume_type_id | fb8b6398-89b4-4e66-8667-22348aa5bf3b |
+----------------+--------------------------------------+


(overcloud) [stack@undercloud-0 ~]$ cinder --os-volume-api-version 3.62 default-type-unset <project-id>
Default volume type for project 18e1a34103bd4095aad97b7bb732c37f has been unset successfully.
(overcloud) [stack@undercloud-0 ~]$ cinder --os-volume-api-version 3.62 default-type-list --project 18e1a34103bd4095aad97b7bb732c37f
ERROR: Default type for project 18e1a34103bd4095aad97b7bb732c37f not found. (HTTP 404) (Request-ID: req-ac56afba-69f4-4c90-bd08-e4592bfffd88)


Moving to VERIFIED

Comment 22 errata-xmlrpc 2024-11-21 09:39:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (RHOSP 17.1.4 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:9974


Note You need to log in before you can comment on or make changes to this bug.