Comment 10 for bug 1419823

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/189661
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=ccea7b68567afb2d5bb825d0cabf247a9526bd93
Submitter: Jenkins
Branch: master

commit ccea7b68567afb2d5bb825d0cabf247a9526bd93
Author: Flavio Percoco <email address hidden>
Date: Tue Jun 9 13:11:36 2015 +0200

    Return empty str for permissive, none, properties

    In Kilo, a patch landed to allow glance for returning None values. While
    this was not an issue for the base and registered properties in the
    `schema-image.json` file, it did break backwards compatibility for the
    custom images created in V1 that have a vulue equal to None.

    In order to restore compatibility, this changes returns empty strings
    for those custom properties that exist in the database but that are not
    part of the V2 schema. This strategy will help migrating such properties
    when updates to the image data happens and it'll be a noop for just
    reads.

    We can't use a schema migration because we don't know off hand which of
    the properties in the database are the ones that would need to be
    migrated.

    While we could skip this properties entirely, this patch prefers to send
    the empty string back as a way to create awareness on the fact that
    there's an empty property in the database. Since we didn't use to return
    these properties, we can assume they weren't being used.

    Closes-bug: #1419823
    Change-Id: I59bb27a892fe9485fc98a612ca0148a84123f5a2