[Bug 1988942] Re: Failed to set image property. Invalid input for field/attribute simplestreams_metadata. Value: ... is too long (HTTP 400)
Jorge Merlino
1988942 at bugs.launchpad.net
Wed Jun 5 18:42:59 UTC 2024
Tested proposed package 2:20.3.1-0ubuntu1.2~cloud0 on focal/yoga. Tested
setting a property with a long value as indicated on the test plan and
worked as expected with no errors.
** Tags removed: verification-yoga-needed
** Tags added: verification-yoga-done
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to cinder in Ubuntu.
https://bugs.launchpad.net/bugs/1988942
Title:
Failed to set image property. Invalid input for field/attribute
simplestreams_metadata. Value: ... is too long (HTTP 400)
Status in Cinder:
Fix Released
Status in Ubuntu Cloud Archive:
Fix Released
Status in Ubuntu Cloud Archive antelope series:
Triaged
Status in Ubuntu Cloud Archive bobcat series:
In Progress
Status in Ubuntu Cloud Archive caracal series:
Fix Released
Status in Ubuntu Cloud Archive yoga series:
Fix Committed
Status in Ubuntu Cloud Archive zed series:
Won't Fix
Status in cinder package in Ubuntu:
Fix Released
Status in cinder source package in Jammy:
Fix Released
Status in cinder source package in Mantic:
Fix Released
Status in cinder source package in Noble:
Fix Released
Bug description:
[Impact]
Cinder does not allow setting volume metadata properties with values longer that 255 characters. Glance does allow values of up to 65536 bytes and a volume created from an image with metadata larger than 255 characters will keep that longer value in Cinder (the Cinder database field is long enough to hold it). The problem is that Cinder would not let a longer value to be set after the volume has been created.
This is inconsistent and generates issues in backup services that expect to be able to set metadata values to the same value the volume had before.
[Test Plan]
Create a volume:
openstack volume create test_vol --size 1
Try to set a property with a long value:
openstack volume set test_vol --image-property
longprop=12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
This should return an error like:
Invalid input for field/attribute longprop. Value: 123456789012345...'
is too long (HTTP 400) (Request-ID:
req-69875caf-16e1-4afb-91c0-3e50ff694c07)
Update cinder to this SRU version and run the volume set command
again. It should work and return nothing.
[Where problems could occur]
The patch just changes the validation for the metadata length. It
includes several tests of border cases. Worst case could be that it
would not allow setting a metadata value that was allowed before but
as the check has been changed to increase the value size that is
unlikely.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1988942/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list