Cinder client command fails without any messages when enable_v1_api is set to false in the cinder.conf

Bug #1488390 reported by chenying
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-cinderclient
Invalid
Undecided
Unassigned

Bug Description

When enable_v1_api is set to false in the cinder.conf, the cinder command 'cinder list' is executed but fails silently.

It just give a message "ERROR: 'volumes'". I don't know that command execution fails because of the value of enable_v1_api.

I think the error message should give us more useful information. When enable_v1_api is set to false, argument

'--os-volume-api-version 2' should be added to cinder command. We should know it from the error message.

[DEFAULT]
log_dir = /opt/stack/log
os_privileged_user_tenant = service
os_privileged_user_password = nomoresecrete
os_privileged_user_name = nova
glance_api_servers = http://192.168.98.188:9292
osapi_volume_workers = 8
logging_exception_prefix = %(color)s%(asctime)s.%(msecs)03d TRACE %(name)s ^[[01;35m%(instance)s^[[00m
logging_debug_format_suffix = ^[[00;33mfrom (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d^[[00m
logging_default_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [^[[00;36m-%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_context_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [^[[01;36m%(request_id)s ^[[00;36m%(user_id)s %(project_id)s%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
volume_clear = zero
rpc_backend = rabbit
default_volume_type = huawei_18000
enabled_backends = huawei_18000
os_region_name = RegionOne
enable_v1_api = false
periodic_interval = 60

stack@openstack3-T3200:~$ cinder list
ERROR: 'volumes'
stack@openstack3-T3200:~$
stack@openstack3-T3200:~$
stack@openstack3-T3200:~$ cinder --os-volume-api-version 2 list
+----+--------+------+------+-------------+----------+-------------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |
+----+--------+------+------+-------------+----------+-------------+-------------+
+----+--------+------+------+-------------+----------+-------------+-------------+

the cinder-api log:

2015-08-25 14:49:13.023 DEBUG eventlet.wsgi.server [-] (21753) accepted ('192.168.98.188', 54216) from (pid=21753) server /usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py:826
2015-08-25 14:49:13.025 INFO cinder.api.openstack.wsgi [-] GET http://192.168.98.188:8776/v1/ecf8a491315a4370843c077623853e15/volumes/detail
2015-08-25 14:49:13.025 DEBUG cinder.api.openstack.wsgi [-] Empty body provided in request from (pid=21753) get_body /opt/stack/cinder/cinder/api/openstack/wsgi.py:862
2015-08-25 14:49:13.027 INFO cinder.api.openstack.wsgi [-] http://192.168.98.188:8776/v1/ecf8a491315a4370843c077623853e15/volumes/detail returned with HTTP 300
2015-08-25 14:49:13.027 INFO eventlet.wsgi.server [-] 192.168.98.188 - - [25/Aug/2015 14:49:13] "GET /v1/ecf8a491315a4370843c077623853e15/volumes/detail HTTP/1.1" 300 510 0.002912

chenying (ying-chen)
Changed in python-cinderclient:
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.