Validation error when doing image-list with v2 api

Bug #1376998 reported by Sam Morrison
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Unassigned

Bug Description

Get the following error when listing images:

Traceback (most recent call last):
  File "./glance-audit.py", line 64, in <module>
    images = list(gc.images.list())
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 75, in list
    yield self.model(**image)
  File "/usr/lib/python2.7/dist-packages/warlock/core.py", line 32, in __init__
    base_class.__init__(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/warlock/model.py", line 35, in __init__
    raise ValueError(str(exc))
ValueError: u'ari-100001d5' does not match u'^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$'

Failed validating u'pattern' in schema[u'properties'][u'ramdisk_id']:
    {u'description': u'ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.',
     u'pattern': u'^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$',
     u'type': u'string'}

On instance[u'ramdisk_id']:
    u'ari-100001d5'

Revision history for this message
Edmund Rhudy (erhudy) wrote :

Bug occurs for me trying to list images or see a specific snapshot after creating a snapshot via the Packer openstack builder:

# glance --os-image-api-version 2 image-show c1320d55-5912-40d3-acc4-aaf5c15033fc
None is not of type u'string'

Failed validating u'type' in schema[u'properties'][u'ramdisk_id']:
    {u'description': u'ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.',
     u'is_base': False,
     u'pattern': u'^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$',
     u'type': u'string'}

On instance[u'ramdisk_id']:
    None

Revision history for this message
Edmund Rhudy (erhudy) wrote :

After stripping all attributes with --purge-props from the image, it no longer errors out. Properties removed:

| Property 'base_image_ref' | 67a11d3f-6e7a-4871-80f1-feebca24943e |
| Property 'description' | boop |
| Property 'image_location' | snapshot |
| Property 'image_state' | available |
| Property 'image_type' | snapshot |
| Property 'instance_uuid' | 39437412-4886-46b2-9857-6438be720103 |
| Property 'network_allocated' | True |
| Property 'owner_id' | 8254be74196f4888b4c15ef2b2e14370 |
| Property 'user_id' | eeeeeeee |

Revision history for this message
Ian Cordasco (icordasc) wrote :

A few questions:

- Can you still reproduce this with the latest python-glanceclient and Glance installations?
- The warlock validation fails for ramdisk_id but it is not listed as one of the properties removed, can you confirm that your ramdisk_id property was also stripped?
- What versions were you using when you filed this?

If a response is not provided in a week, this will be closed as invalid since I do not have enough information to attempt to reproduce it.

Changed in python-glanceclient:
status: New → Incomplete
Ian Cordasco (icordasc)
Changed in python-glanceclient:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.