openstackopenstack-glance

Invalid API version parameter. Supported values are [1, 2] in OpenStack Glance


After I install the glance, When I execute the:

[root@ha-node1 ~]# glance image-create --name "cirros-0.3.4-x86_64" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress

I get the below error:

Invalid API version parameter. Supported values are [1, 2]

And if I use the glance image-list will get this error too:

[root@ha-node1 ~]# glance image-list 
Invalid API version parameter. Supported values are [1, 2]

And in my /root/admin-openrc:

export OS_USER_DOMAIN_ID=default
export OS_PROJECT_DOMAIN_ID=default
export OS_USERNAME=admin
export OS_PROJECT_NAME=admin
export OS_PASSWORD=passw0rd
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_URL=http://devops.taobao.com:35357/v3
export OS_IMAGE_API_VERSION=3

I set the OS_IMAGE_API_VERSION is 3, why I can not use the API version 3 parameter

Someone know why there is the error?

My OpenStack is Newton. VM is CentOS 7.2


Solution

  • Glance doesn't have a v3 API. The current API version is 2.5, and Newton supports 2.4. See Image Service Versions for additional details.