Bug 1291385

Summary: Cinder create volume from image: AttributeError: 'Schema' object has no attribute 'is_base_property'
Product: Red Hat OpenStack Reporter: Eric Harney <eharney>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED ERRATA QA Contact: lkuchlan <lkuchlan>
Severity: high Docs Contact:
Priority: high    
Version: 7.0 (Kilo)CC: eglynn, eharney, fpercoco, hguemar, jruzicka, mschuppe, nlevinki, scohen, sgotliv, srevivo
Target Milestone: ---Keywords: ZStream
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-cinder-2015.1.2-6.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1290548 Environment:
Last Closed: 2016-04-26 15:29:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1290548, 1292884    
Bug Blocks:    

Description Eric Harney 2015-12-14 18:23:04 UTC
+++ This bug was initially created as a clone of Bug #1290548 +++

Cinder create volume from image fails on

openstack-cinder-2015.1.2-3.el7ost and openstack-cinder-2015.1.2-4.el7ost with this error.

This seems to be related to the patch introduced in bug 1280362. "Fix properties extracting from image with glance api".

> Traceback (most recent call last): 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 67, in _execute_task 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api result = task.execute(**arguments) 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api File "/usr/lib/python2.7/site-packages/cinder/volume/flows/api/create_volume.py", line 417, in execute 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api self._check_image_metadata(context, image_id, size) 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api File "/usr/lib/python2.7/site-packages/cinder/volume/flows/api/create_volume.py", line 251, in _check_image_metadata 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api image_meta = self.image_service.show(context, image_id) 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 243, in show 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api base_image_meta = self._translate_from_glance(context, image) 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 366, in _translate_from_glance 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api for key in image.keys() 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 367, in <dictcomp> 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api if self._image_schema.is_base_property(key) is True 
> 2015-12-10 10:52:31.774 325 TRACE cinder.volume.api AttributeError: 'Schema' object has no attribute 'is_base_property' 
>

--- Additional comment from Sergey Gotliv on 2015-12-14 06:06:03 EST ---

<snip>

users should update to python-glanceclient-0.14.2-3.el7ost if they have older versions or to python-glanceclient-0.17.3-1.el7ost which we have to build and ship with the next async on Dec 17 (that problem is fixed in 0.17.3 upstream).

Comment 2 lkuchlan 2016-04-10 12:51:41 UTC
Tested using:
openstack-cinder-2015.1.2-5.el7ost.noarch

Verification flow:

[stack@undercloud ~]$ cinder create 1 --image-id 2ebba986-8183-4e00-9c1a-7f3d5c0e70f5
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2016-04-10T12:46:16.284998      |
| display_description |                 None                 |
|     display_name    |                 None                 |
|      encrypted      |                False                 |
|          id         | 8e0f728f-652f-492a-92d5-5bbb9e11d917 |
|       image_id      | 2ebba986-8183-4e00-9c1a-7f3d5c0e70f5 |
|       metadata      |                  {}                  |
|     multiattach     |                false                 |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+

[stack@undercloud ~]$ cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 8e0f728f-652f-492a-92d5-5bbb9e11d917 | available |      -       |  1   |      -      |   true   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

Comment 4 errata-xmlrpc 2016-04-26 15:29:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0688.html