Comment 1 for bug 911599

Revision history for this message
justinsb (justin-fathomdb) wrote :

Aha.... I think the root problem is here, in nova, in nova/image/glance.py

The metadata update fetches all the metadata, merges in the values, and then posts that to glance (which is not the strictly correct in terms of concurrent updates, but anyway...)

The problem is that the fetch returns 'Location' of None.

https://github.com/openstack/nova/blob/master/nova/image/glance.py#L437

def _limit_attributes(image_meta):
    IMAGE_ATTRIBUTES = ['size', 'location', 'disk_format',
                        'container_format', 'checksum', 'id',
                        'name', 'created_at', 'updated_at',
                        'deleted_at', 'deleted', 'status',
                        'min_disk', 'min_ram', 'is_public']
    output = {}
    for attr in IMAGE_ATTRIBUTES:
        output[attr] = image_meta.get(attr)

    output['properties'] = image_meta.get('properties', {})

    return output

That sets ['location'] to None; which then gets passed to the glance registry, which then updates the location to None.