openstack n 版本 cinder 的问题求助一下

2018-08-27 11:17:43 +08:00
 winjohn
执行 cinder list 始终会报错如下

# cinder list
WARNING:cinderclient.shell:Cannot determine the API version from the endpoint URL. Falling back to the user-specified version: None
ERROR: Not Found (HTTP 404)

打开了日志的 debug 级别,发现如下错误,可是这里不太清楚这个东西是哪里配置的,有劳大佬们指导一下。
2018-08-27 11:10:24.428 28484 DEBUG eventlet.wsgi.server [-] (28484) accepted ('10.10.110.11', 44094) server /usr/lib/python2.7/site-packages/eventlet/wsgi.py:867
2018-08-27 11:10:24.430 28484 INFO eventlet.wsgi.server [-] 10.10.110.11 "GET /v2.1/ec44c767e80449db9c8ca76b9046f5cc/volumes/detail HTTP/1.1" status: 404 len: 200 time: 0.0009341
1188 次点击
所在节点    问与答
6 条回复
josephok
2018-08-27 12:28:46 +08:00
Endpoint-list 看一下结果
onetown
2018-08-27 12:37:32 +08:00
endpoint 里没有设置 v2.1, 你使用 openstack-pythonclient 看一下 endpoint, "openstack endpoint list", 看看有没有 blockstorage 2.1 的 endpoint, 没有的话, 看文档加一下。
winjohn
2018-08-27 13:16:57 +08:00
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+
| 0ee60668ed4f4904a920065143fc8d39 | RegionOne | glance | image | True | admin | http://10.10.110.11:9292 |
| 169722bb62404e7dbfa3b4e720a33972 | RegionOne | nova | compute | True | public | http://10.10.110.11:8774/v2.1/%(tenant_id)s |
| 1a36ff77f36542ebbe63fc2e260fff0c | RegionOn | keystone | identity | True | internal | http://10.10.110.11:35357/v3/ |
| 240b4799f209491984e8a4466ab51adc | RegionOne | cinderv2 | volumev2 | True | admin | http://10.10.110.11:8776/v2.1/%(tenant_id)s |
| 2beb7b32b5d547bab7bd4d8b60f9b7ca | RegionOne | neutron | network | True | internal | http://10.10.110.11:9696 |
| 366dee29ca034bf9bcbf02c6331b68c9 | RegionOn | keystone | identity | True | public | http://10.10.110.11:5000/v3/ |
| 39d7bfb4ea9b416294cbe4b745c5571e | RegionOn | keystone | identity | True | admin | http://10.10.110.11:35357/v3/ |
| 4c312fa01c444b3db3dc9a5dd35c366c | RegionOne | cinder | volume | True | admin | http://10.10.110.11:8776/v2.1/%(tenant_id)s |
| 50160c66612f4549ba09f6df9b4db847 | RegionOne | cinder | volume | True | internal | http://10.10.110.11:8776/v2.1/%(tenant_id)s |
| 50a39de690404816a450a1cf597483b8 | RegionOne | cinderv2 | volumev2 | True | internal | http://10.10.110.11:8776/v2.1/%(tenant_id)s |
| 68de45ead00747289c273140c226f985 | RegionOne | cinderv2 | volumev2 | True | public | http://10.10.110.11:8776/v2.1/%(tenant_id)s |
| 6ee47039a3264c6b98bae7d83057e809 | RegionOne | glance | image | True | internal | http://10.10.110.11:9292 |
| 7fce3bed69714d5d9232521a1f55a486 | RegionOne | nova | compute | True | internal | http://10.10.110.11:8774/v2.1/%(tenant_id)s |
| 88219dab998a42a3b3a0841d678a5abc | RegionOne | neutron | network | True | admin | http://10.10.110.11:9696 |
| 96bca0aff21647828863489fefc6902c | RegionOne | glance | image | True | public | http://10.10.110.11:9292 |
| a9ec047eb7d8491c829262be5695e771 | RegionOne | neutron | network | True | public | http://10.10.110.11:9696 |
| d93d7b87abab4514a4d22dc96e30e6a9 | RegionOne | neutron | network | True | admin | http://10.10.110.11:9696 |
| db441726b4f640908dd4adaf3927a9c4 | RegionOne | nova | compute | True | admin | http://10.10.110.11:8774/v2.1/%(tenant_id)s |
| f5ffeb9ec3764e608d52bcb757252991 | RegionOne | cinder | volume | True | public | http://10.10.110.11:8776/v2.1/%(tenant_id)s |

@josephok
@onetown
二位老铁,我这里是注册过对应的 cinder 项目的,但是从 404 的结果来看,不知道为啥请求到 /v2.1/ec44c767e80449db9c8ca76b9046f5cc/这个不存在的去了?请帮忙看看是哪里的问题。
onetown
2018-08-27 13:50:43 +08:00
cinder 后面带个--os-volume-api-version=v2 试试, 好久没用 openstack, 不太记得怎么弄了
winjohn
2018-08-27 14:02:35 +08:00
@onetown 不行哎。。
#cinder --os-volume-api-version=v2 list
ERROR: Invalid format of client version 'v2'. Expected format 'X.Y', where X is a major part and Y is a minor part of version.
onetown
2018-08-27 14:48:56 +08:00
@winjohn 那就 v2.1

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/483562

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX