Volume type's extra_specs dictionary is empty when executing GET request for show_all_extra_specs and show_extra_spec_for_volume_type.
The failures occurred on the upstream version.
On downstream, all went fine for reader, member and admin users (Red Hat OpenStack Platform release 17.1.0 Beta (Wallaby)).
Volume type creation:
2023-05-03 06:28:28.821 90254 INFO tempest.lib.common.rest_client [req-091d530a-0a5b-40f3-a8a2-3abff248476c req-091d530a-0a5b-40f3-a8a2-3abff248476c ] Request (VolumeTypesReaderTests:setUpClass): 200 POST https://158.69.72.236/volume/v3/5cfdbebaa57b40fc801c769d11b17425/types 0.318s
2023-05-03 06:28:28.821 90254 DEBUG tempest.lib.common.rest_client [req-091d530a-0a5b-40f3-a8a2-3abff248476c req-091d530a-0a5b-40f3-a8a2-3abff248476c ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: {"volume_type": {"name": "tempest-volume-type-1222335103", "description": "description", "extra_specs": {"key1": "value1"}, "os-volume-type-access:is_public": true}}
Response - Headers: {'date': 'Wed, 03 May 2023 06:28:28 GMT', 'server': 'Apache/2.4.52 (Ubuntu)', 'content-type': 'application/json', 'x-compute-request-id': 'req-091d530a-0a5b-40f3-a8a2-3abff248476c', 'content-length': '230', 'openstack-api-version': 'volume 3.0', 'vary': 'OpenStack-API-Version', 'x-openstack-request-id': 'req-091d530a-0a5b-40f3-a8a2-3abff248476c', 'connection': 'close', 'status': '200', 'content-location': 'https://158.69.72.236/volume/v3/5cfdbebaa57b40fc801c769d11b17425/types'}
Body: b'{"volume_type": {"id": "39cd6c93-39f1-4c54-9408-4f9703c3d07a", "name": "tempest-volume-type-1222335103", "is_public": true, "extra_specs": {"key1": "value1"}, "description": "description", "os-volume-type-access:is_public": true}}' _log_request_full /opt/stack/tempest/tempest/lib/common/rest_client.py:464
- example of GET request for "Show all extra specifications for volume type":
https://docs.openstack.org/api-ref/block-storage/v3/?expanded=show-extra-specification-for-volume-type-detail#show-all-extra-specifications-for-volume-type
2023-05-03 06:28:29.468 90254 INFO tempest.lib.common.rest_client [req-072852d8-7d7d-4678-a0ab-1bc610478884 req-072852d8-7d7d-4678-a0ab-1bc610478884 ] Request (VolumeTypesReaderTests:test_list_all_extra_specs_for_volume_type): 200 GET https://158.69.72.236/volume/v3/5cfdbebaa57b40fc801c769d11b17425/types/39cd6c93-39f1-4c54-9408-4f9703c3d07a/extra_specs 0.028s
2023-05-03 06:28:29.468 90254 DEBUG tempest.lib.common.rest_client [req-072852d8-7d7d-4678-a0ab-1bc610478884 req-072852d8-7d7d-4678-a0ab-1bc610478884 ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: None
Response - Headers: {'date': 'Wed, 03 May 2023 06:28:29 GMT', 'server': 'Apache/2.4.52 (Ubuntu)', 'content-type': 'application/json', 'x-compute-request-id': 'req-072852d8-7d7d-4678-a0ab-1bc610478884', 'content-length': '19', 'openstack-api-version': 'volume 3.0', 'vary': 'OpenStack-API-Version', 'x-openstack-request-id': 'req-072852d8-7d7d-4678-a0ab-1bc610478884', 'connection': 'close', 'status': '200', 'content-location': 'https://158.69.72.236/volume/v3/5cfdbebaa57b40fc801c769d11b17425/types/39cd6c93-39f1-4c54-9408-4f9703c3d07a/extra_specs'}
Body: b'{"extra_specs": {}}' _log_request_full /opt/stack/tempest/tempest/lib/common/rest_client.py:464
- example of GET request for "Show extra specification for volume type":
https://docs.openstack.org/api-ref/block-storage/v3/?expanded=#show-extra-specification-for-volume-type
2023-05-03 06:28:29.545 90254 INFO tempest.lib.common.rest_client [req-b5e792f3-280d-4e71-ad31-b360942d0005 req-b5e792f3-280d-4e71-ad31-b360942d0005 ] Request (VolumeTypesReaderTests:test_show_extra_spec_for_volume_type): 404 GET https://158.69.72.236/volume/v3/5cfdbebaa57b40fc801c769d11b17425/types/39cd6c93-39f1-4c54-9408-4f9703c3d07a/extra_specs/key1 0.032s
2023-05-03 06:28:29.545 90254 DEBUG tempest.lib.common.rest_client [req-b5e792f3-280d-4e71-ad31-b360942d0005 req-b5e792f3-280d-4e71-ad31-b360942d0005 ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: None
Response - Headers: {'date': 'Wed, 03 May 2023 06:28:29 GMT', 'server': 'Apache/2.4.52 (Ubuntu)', 'openstack-api-version': 'volume 3.0', 'vary': 'OpenStack-API-Version', 'content-length': '128', 'content-type': 'application/json', 'x-compute-request-id': 'req-b5e792f3-280d-4e71-ad31-b360942d0005', 'x-openstack-request-id': 'req-b5e792f3-280d-4e71-ad31-b360942d0005', 'connection': 'close', 'status': '404', 'content-location': 'https://158.69.72.236/volume/v3/5cfdbebaa57b40fc801c769d11b17425/types/39cd6c93-39f1-4c54-9408-4f9703c3d07a/extra_specs/key1'}
Body: b'{"itemNotFound": {"code": 404, "message": "Volume Type 39cd6c93-39f1-4c54-9408-4f9703c3d07a has no extra specs with key key1."}}' _log_request_full /opt/stack/tempest/tempest/lib/common/rest_client.py:464
I think this is correct behavior for non-admins -- extra specs would only be shown for admin users.