[Bug 1988942] Fix merged to cinder (stable/2023.2)

OpenStack Infra 1988942 at bugs.launchpad.net
Tue May 7 21:02:03 UTC 2024


Reviewed:  https://review.opendev.org/c/openstack/cinder/+/903828
Committed: https://opendev.org/openstack/cinder/commit/2fb2ff99b4cbf615163dbd663b853da590cd8995
Submitter: "Zuul (22348)"
Branch:    stable/2023.2

commit 2fb2ff99b4cbf615163dbd663b853da590cd8995
Author: Jorge Merlino <jorge.merlino at canonical.com>
Date:   Fri Dec 23 09:46:43 2022 -0300

    Increase size of volume image metadata values
    
    Volume image metadata values were limited to 255 characters but Glance
    allows up to 65535 (considering it uses a TEXT field in MySQL). Cinder
    database also uses a TEXT field for those values so it made no sense to
    limit them to 255. The actual values could already be longer when they
    were copied from the image at volume creation time.
    
    Closes-Bug: #1988942
    Change-Id: Id200ae93384a452b34bdd20dd1f3fc656ec5650f
    (cherry picked from commit 0bd1bd699d51162557dd0791ac6e79cb3149db8c)

-- 
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:
  In Progress
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 Committed
Status in cinder source package in Mantic:
  Fix Committed
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