Quotas: Some operations fail with a 255 volume type name

Bug #1948962 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Gorka Eguileor

Bug Description

On change I6c30a6be750f6b9ecff7399dbb0aea66cdc097da we increased the
`resource` column of the quota_usages table from 255 to 300, because its
value is constructed from (prefix + volume_type_name), but the length of
`volume_type_name` can be up to 255 characters, so if we add a prefix
such as 'volumes_' or 'gigabytes_' to it we'll exceed the db length
limit of the `resource` column.

There are other 3 quota related tables (quotas, quota_classes,
reservations) that have a `resource` column, and they are all
referencing the same kind of thing, but they still have a maximum size
of 255 characters, so there will be things that we won't be able to do
when using a volume type with a 255 characters name. Some of the
operations we won't be able to do are setting a default quota limit for
it or migrate volumes using that volume type.

Related-Bug: #1798327
Related-Bug: #1608849

Tags: quotas
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/c/openstack/cinder/+/815712

Changed in cinder:
status: New → In Progress
Changed in cinder:
importance: Undecided → Medium
summary: - Some operations fail with a 255 volume type name
+ Quotas: Some operations fail with a 255 volume type name
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/815712
Committed: https://opendev.org/openstack/cinder/commit/3a968212d6fc259f9f5855154a3e5246aa18eb10
Submitter: "Zuul (22348)"
Branch: master

commit 3a968212d6fc259f9f5855154a3e5246aa18eb10
Author: Gorka Eguileor <email address hidden>
Date: Wed Oct 27 18:46:53 2021 +0200

    DB: Set quota resource property length to 300

    On change I6c30a6be750f6b9ecff7399dbb0aea66cdc097da we increased the
    `resource` column of the quota_usages table from 255 to 300, because its
    value is constructed from (prefix + volume_type_name), but the length of
    `volume_type_name` can be up to 255 characters, so if we add a prefix
    such as 'volumes_' or 'gigabytes_' to it we'll exceed the db length
    limit of the `resource` column.

    There are other 3 quota related tables (quotas, quota_classes,
    reservations) that have a `resource` column, and they are all
    referencing the same kind of thing, but they still have a maximum size
    of 255 characters, so there will be things that we won't be able to do
    when using a volume type with a 255 characters name. Some of the
    operations we won't be able to do are setting a default quota limit for
    it or migrate volumes using that volume type.

    Related-Bug: #1798327
    Related-Bug: #1608849
    Closes-Bug: #1948962
    Change-Id: I40546b20322443dc34556de4aababf33a230db78

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

This issue was fixed in the openstack/cinder 24.0.0.0rc1 release candidate.

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.