Incorrect limit for private type volumes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
Low
|
Gorka Eguileor |
Bug Description
Cinder allows admins to make private a volume type that already has volumes, and if the admin doesn't give permission to the project for the type the quota limits and usage will not reflect that the user can't create new resources and instead show as unlimited (-1), which is wrong.
The quota limits and usage should reflect that the number of volumes they can create for that type is 0 (no access to the type) while at the same time correctly report the current usage.
Following steps show this behavior:
$ cinder create --volume-type lvmdriver-1 --name test 1
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-
| description | None |
| encrypted | False |
| id | 4af87103-
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | None |
| user_id | b076a33c2e4240b
| volume_type | lvmdriver-1 |
+------
$ cinder type-update --is-public false 08bb263a-
+------
| ID | Name | Description | Is_Public |
+------
| 08bb263a-
+------
$ cinder quota-usage a41464e54125407
+------
| Type | In_use | Reserved | Limit | Allocated |
+------
| backup_gigabytes | 1 | 0 | 1000 | |
| backups | 1 | 0 | 10 | |
| gigabytes | 1 | 0 | 1000 | |
| gigabytes_
| gigabytes_
| groups | 0 | 0 | 10 | |
| per_volume_
| snapshots | 0 | 0 | 10 | |
| snapshots_
| snapshots_
| volumes | 1 | 0 | 10 | |
| volumes___DEFAULT__ | 0 | 0 | -1 | |
| volumes_lvmdriver-1 | 1 | 0 | -1 | |
+------
summary: |
- A project can have resources of a type they don't have access to + Incorrect limit for private type volumes |
Changed in cinder: | |
importance: | Undecided → Low |
tags: | added: private type |
Fix proposed to branch: master /review. opendev. org/c/openstack /cinder/ +/819691
Review: https:/