cinder/cinder/api/validation
Gorka Eguileor 3a968212d6 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
2024-01-12 14:25:43 +01:00
..
__init__.py V3 jsonschema validation: base schema framework 2017-11-17 16:01:03 +05:30
parameter_types.py DB: Set quota resource property length to 300 2024-01-12 14:25:43 +01:00
validators.py Increase size of volume image metadata values 2023-08-11 11:50:37 -03:00