[openstack-dev] [nova][glance] snapshots are broken by default with newton and glance v2

Erno Kuvaja ekuvaja at redhat.com
Mon Jul 18 11:41:37 UTC 2016


On Mon, Jul 18, 2016 at 5:19 AM, Nikhil Komawar <nik.komawar at gmail.com> wrote:
> Thanks Matt. I've scheduled for a release of the client this week.
>
> On 7/16/16 4:09 AM, Matt Riedemann wrote:
>> This is more of a heads up than anything.
>>
>> Our internal CI is running Tempest with images that don't have
>> kernel_id or ramdisk_id properties set.
>>
>> We're running from master so nova defaults to use_glance_v1=False.
>>
>> Because of this:
>>
>> https://github.com/openstack/nova/blob/47358449d359a287d21426b4e1f18479a4d1fd36/nova/compute/api.py#L867-L868
>>
>>
>> and this:
>>
>> https://github.com/openstack/nova/blob/47358449d359a287d21426b4e1f18479a4d1fd36/nova/image/glance.py#L835
>>
>>
>> The snapshot image properties get kernel_id and ramdisk_id set to None
>> since that's what the glance v2 schema requires.
>>
>> However, python-glanceclient has it's own outdated copy of the schema
>> which doesn't allow null values for those properties, see bug:
>>
>> https://bugs.launchpad.net/python-glanceclient/+bug/1596602
>>
>> We don't hit this in the community CI because the image that Tempest
>> uses from devstack has the kernel_id and ramdisk_id properties set:
>>
>> http://logs.openstack.org/52/335152/1/check/gate-tempest-dsvm-neutron-src-python-glanceclient/d393db9/logs/devstacklog.txt.gz#_2016-06-28_18_40_12_429
>>
>>
>> But for anyone else upgrading to Newton that has images without those
>> properties set and doesn't have use_glance_v1=True in nova.conf is
>> going to be broken.
>>
>> Since we really want to get people off glance v1 and move to
>> deprecation in Ocata, we need to get this merged and released:
>>
>> https://review.openstack.org/#/c/335152/
>>
>> And bump the minimum required python-glanceclient in
>> global-requirements for Newton.
>>
>> I'm not really sure why python-glanceclient even has it's own copy of
>> the image schema, that seems redundant and error prone given the
>> glance API already validates that, but it's kind of beside the point
>> right now.
>>
>
> --
>
> Thanks,
> Nikhil
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Hi Matt,

Something has broken on the way if that shipped schema actually affect
your operation. That should be used _only_ when the client is called
without connection to the Glance API (for example in a case you have
no env set and you call `glance help`), this is btw the reason why we
have that schema shipped with the client.

As soon as you execute a call that actually interacts with Glance API
we should be pulling the schema from there. So if this is not the
case, we've broken somewhere on the way. I'll try to find time to have
a look.

- Erno



More information about the OpenStack-dev mailing list