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

Matt Riedemann mriedem at linux.vnet.ibm.com
Sat Jul 16 08:09:14 UTC 2016


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,

Matt Riedemann




More information about the OpenStack-dev mailing list