Ask Your Question
0

how to specify glance api version at server side

asked 2015-03-25 22:48:03 -0500

Scott Zhang gravatar image

updated 2015-03-26 00:07:44 -0500

SGPJ gravatar image

Hello,

I encountered an error while running glance cli. If I export the OS_IMAGE_API_VERSION to 1, then I will be able to run glance cli. However, if I export OS_IMAGE_API_VERSION to 2, then it will encounter an internal error. Could anyone please let me know how to adjust the glance api version at the server side to make the client also compatible to image api version 2? More information can be founded as follow:

su@ubuntu:/opt/stack/glance/glance$ export OS_IMAGE_API_VERSION=1
su@ubuntu:/opt/stack/glance/glance$ glance image-list
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| ID                                   | Name                            | Disk Format | Container Format | Size      | Status |
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| 4adda55e-fa6e-4605-aa42-aa5faabc04b8 | cirros-0.3.2-x86_64-uec         | ami         | ami              | 25165824  | active |
| e979c1b2-d4f1-4dac-a447-4d56005e0d82 | cirros-0.3.2-x86_64-uec-kernel  | aki         | aki              | 4969360   | active |
| 7ce02482-a74e-4eac-942d-cf489ed2b65b | cirros-0.3.2-x86_64-uec-ramdisk | ari         | ari              | 3723817   | active |
| 6155a107-96f8-4158-901f-000a46fd680c | Fedora-x86_64-20-20140618-sda   | qcow2       | bare             | 209649664 | active |
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
su@ubuntu:/opt/stack/glance/glance$ export OS_IMAGE_API_VERSION=2
su@ubuntu:/opt/stack/glance/glance$ glance image-list
HTTPInternalServerError (HTTP 500)

Thanks,

edit retag flag offensive close merge delete

Comments

SGPJ gravatar imageSGPJ ( 2015-03-26 00:11:26 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-03-26 12:13:39 -0500

Scott Zhang gravatar image

thanks for your response! Here is what I got from 'keystone endpoint-list', however, it does not show any version related information from glance endpoint (I assume the glance url is the one with port number 9292). Any suggestions?

BTW, Please find my running script as follow:

su@ubuntu:/opt/stack/glance$ keystone endpoint-list +----------------------------------+-----------+-----------------------------------------------+-----------------------------------------------+-----------------------------------------------+----------------------------------+ | id | region | publicurl | internalurl | adminurl | service_id | +----------------------------------+-----------+-----------------------------------------------+-----------------------------------------------+-----------------------------------------------+----------------------------------+ | 22d5f4c3a5864ad19299974bf4692eee | RegionOne | http://172.16.152.171:8000/v1 | http://172.16.152.171:8000/v1 | http://172.16.152.171:8000/v1 | c1bad4b3ee3b4cce9c15ed846035d678 | | 2d1ac5469b624709b294b03df75a51b5 | RegionOne | http://172.16.152.171:3333 | http://172.16.152.171:3333 | http://172.16.152.171:3333 | 117cf0f7de7c45309142ff9f1e6fff57 | | 63e0c7a0a86a468c94ed64533bcb1bb7 | RegionOne | http://172.16.152.171:9292 | http://172.16.152.171:9292 | http://172.16.152.171:9292 | 9f8c054fd8224b35a0768456b65212a1 | | ae97d9d72c8d41eeaf7c899671c07f75 | RegionOne | http://172.16.152.171:8774/v2/$(tenan... | http://172.16.152.171:8774/v2/$(tenan... | http://172.16.152.171:8774/v2/$(tenan... | 60575671e7844374b380876998c7f785 | | bcc7b36528ce44fab17301597b7744e8 | RegionOne | http://172.16.152.171:5000/v2.0 | http://172.16.152.171:5000/v2.0 | http://172.16.152.171:35357/v2.0 | 3c31b06de211446080b8a5663e90cc55 | | cd1432ebcdbe48949a7b122bba238255 | RegionOne | http://172.16.152.171:8776/v1/$(tenan... | http://172.16.152.171:8776/v1/$(tenan... | http://172.16.152.171:8776/v1/$(tenan... | 382e6521a4cc4389ade2ba455b36a0a8 | | dcd6120fddbf4da0a91d19728e109fdd | RegionOne | http://172.16.152.171:8004/v1/$(tenan... | http://172.16.152.171:8004/v1/$(tenan... | http://172.16.152.171:8004/v1/$(tenan... | 859c780229f94dd1a727f0a8b1c0e8ef | | de1c5f65f1e84a40840f1b90980d71f2 | RegionOne | http://172.16.152.171:8776/v2/$(tenan... | http://172.16.152.171:8776/v2/$(tenan... | http://172.16.152.171:8776/v2/$(tenan... | 8db90b6e75a944fbb875776af50bb5ac | | dfc1834739d8478f8a37f6875394dcad | RegionOne | http://172.16.152.171:8774/v2.1/$(ten... | http://172.16.152.171:8774/v2.1/$(ten... | http://172.16.152.171:8774/v2.1/$(ten... | e9b1eb421c7840f9955239a98b2dcc83 | | e41c0572bee54fc8a29cd2a6561667c0 | RegionOne | http://172.16.152.171:8773/ | http://172.16.152.171:8773/ | http://172.16.152.171:8773/ | 9e7140c42f954243973427b1241eccad | +----------------------------------+-----------+-----------------------------------------------+-----------------------------------------------+-----------------------------------------------+----------------------------------+ su@ubuntu:/opt/stack/glance$

edit flag offensive delete link more
0

answered 2015-03-26 11:03:56 -0500

How about just running 'keystone endpoint-list' to see what version the endpoint is exposing/using?

edit flag offensive delete link more

Comments

thanks for your response! Here is what I got from 'keystone endpoint-list', however, it does not show any version related information from glance endpoint (I assume the glance url is the one with port number 9292). Any suggestions?

BTW, Please find my running script as follow:

su@ubuntu:/opt/stack

Scott Zhang gravatar imageScott Zhang ( 2015-03-26 12:13:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2015-03-25 22:48:03 -0500

Seen: 411 times

Last updated: Mar 26 '15