issue with glance python client in Icehouse

Bug #1402632 reported by Olaf
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Low
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

I installed glance client (0.15.0) on Ubuntu 14.04.1 LTS via pip install python-glanceclient. When i try to do something with this client i almost allways get back:

root@anyhost:~/anydir# glance image-list
"1" is not a supported API version. Example values are "1" or "2".

Environment (OS_USERNAME, OS_PASSWORD, ...) seems to be fine cause i'm able to list all from keystone with those credantials.

Olaf (olase)
description: updated
Revision history for this message
Louis Taylor (kragniz) wrote :

I'm not seeing that over in my environment with a clean install of glanceclient from pip. What happens if you do:

    $ glance --os-image-api-version 2 image-list

or:

    $ glance --os-image-api-version 1 image-list

The error you're seeing should appear when glanceclient has failed to import the relevant versioned module.

Revision history for this message
Olaf (olase) wrote :

root@anyhost:~/anydir# glance --os-image-api-version 2 image-list
No module named netifaces
root@anyhost:~/anydir# glance --os-image-api-version 1 image-list
"1" is not a supported API version. Example values are "1" or "2".

Well when i uninstall the client with "pip uninstall python-glanceclient" and install an older version with "pip install python-glanceclient==0.14.0" it seems to work fine.

root@anyhost:~/anydir# glance image-list
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
| 781aceb8-14bb-456a-a95a-50c34ee34331 | cirros-0.3.2-x86_64 | qcow2 | bare | 13167616 | active |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+

root@anyhost:~/anydir# glance --version
0.14.0

Revision history for this message
Olaf (olase) wrote :

After installing netifaces (pip install netifaces) it seems to work with version 0.15.0 too.
But why netifaces was no installed? I dont know!

no longer affects: openstack-community
Revision history for this message
yalei wang (yalei-wang) wrote :

I think u should use it like this:

 glance --os-image-api-version 1 image-list

Revision history for this message
Louis Taylor (kragniz) wrote :

I think this was something to do with your install of oslo.utils, since netifaces should be pulled in as a dependancy via that package, so I'm going to mark this as invalid for now.

Changed in glance:
status: New → Invalid
Revision history for this message
Björn Pettersson (bjoernfan) wrote :

I just had the same issue on a completly fresh install of Ubuntu 14.04, so I ran this:

    pip install --upgrade --force-reinstall python-glanceclient

... and got this at the end:

    ...
    creating build/temp.linux-x86_64-2.7/src/cryptography/hazmat/bindings/__pycache__

    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_70441dc9x8be47966.c -o build/temp.linux-x86_64-2.7/src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_70441dc9x8be47966.o

    src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_70441dc9x8be47966.c:194:25: fatal error: openssl/aes.h: No such file or directory

     #include <openssl/aes.h>

                             ^

    compilation terminated.

    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
    Cleaning up...
    Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-YrIH3Q-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/cryptography
    Storing debug log for failure in /home/epettbj/.pip/pip.log

So I installed libssl-dev:

    apt-get install libssl-dev

And ran the above reinstall command again and it worked.

Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :
affects: glance → python-glanceclient
Changed in python-glanceclient:
status: Invalid → Fix Committed
importance: Undecided → Low
milestone: none → 0.19.0
Changed in python-glanceclient:
status: Fix Committed → Fix Released
Revision history for this message
Paul White (paulw2u) wrote :

Closing redundant Ubuntu task

Changed in ubuntu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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