[Bug 1988942] Re: Failed to set image property. Invalid input for field/attribute simplestreams_metadata. Value: ... is too long (HTTP 400)

Ɓukasz Zemczak 1988942 at bugs.launchpad.net
Thu Mar 21 08:50:36 UTC 2024


The SRU looks okay, but any reason for the excessive versioning? The
queues have 2:20.3.1-0ubuntu1.1.22.04.1 and 2:23.0.0-0ubuntu1.1.22.10.1
- the 22.10.1 and 22.04.1 suffixes seem unnecessary? Why not
2:23.0.0-0ubuntu1.2 and 2:20.3.1-0ubuntu1.2?

-- 
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:
  In Progress
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:
  In Progress
Status in Ubuntu Cloud Archive zed series:
  In Progress
Status in cinder package in Ubuntu:
  Fix Released
Status in cinder source package in Jammy:
  In Progress
Status in cinder source package in Mantic:
  In Progress
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