Failed to execute 'cinder list' on devstack

Asked by Davis Anario

I am using devstack in master branch.I want to use this command 'cinder list'.I find a error message.

stack@davis_stack:~$ cinder list ERROR: You must provide a user name through --os-username or env[OS_USERNAME].

Question information

Language:
English Edit question
Status:
Solved
For:
Cinder Edit question
Assignee:
No assignee Edit question
Solved by:
chenying
Solved:
Last query:
Last reply:
Revision history for this message
Best chenying (ying-chen) said :
#1

You should have a file named something containing "RC" in the directory which should be created when you run DevStack, this file contains some variables that is set for authentication against Keystone, for example the OS_USERNAME environment variable is one of them.

You can either "source" this file and then run your commands or you can provide the python-cinderclient (the Cinder CLI client) with parameters for the credentials, for example the --os-username.

Example would be

cat adminrc
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=adminpasswordhere
export OS_AUTH_URL=http://127.0.0.1:35357/v2.0
export OS_VOLUME_API_VERSION=2
source adminrc
cinder list
The reason I set OS_VOLUME_API_VERSION to version 2 is simply because version 1 is or is being deprecated so it's disabled on our cloud (OpenStack Kilo).

Revision history for this message
Davis Anario (anario01) said :
#2

Thanks chenying, that solved my question.