How to use cinder command even set environment for it?

asked 2020-03-08 22:42:37 -0600

rawmain gravatar image

updated 2020-03-09 00:08:50 -0600

I have set environment for openstack:

cat ~/.openstack/
export OS_CLOUD=mycloud
export OS_USERNAME=myuser
export OS_PASSWORD=mypass

Define OS_CLOUD as:

  identity_api_version: "3"
  region_name: RegionOne
  verify: False
    auth_url: https://[IP]:5000/v3
    user_domain_name: "Default"
    project_name: "myproject"
    project_domain_name: "default"


$ source ~/.openstack/

Then run cinder command:

$ cinder list
ERROR: You must provide a tenant_name, tenant_id, project_id or project_name (with project_domain_name or project_domain_id) via   --os-tenant-name (env[OS_TENANT_NAME]),  --os-tenant-id (env[OS_TENANT_ID]),  --os-project-id (env[OS_PROJECT_ID])  --os-project-name (env[OS_PROJECT_NAME]),  --os-project-domain-id (env[OS_PROJECT_DOMAIN_ID])  --os-project-domain-name (env[OS_PROJECT_DOMAIN_NAME])

It still ask me to provide tenant_name, tenant_id, project_id or project_name. Why?

edit retag flag offensive close merge delete


Either user domain name or project domain name is incorrect. One is Default, the other default.

Bernd Bausch gravatar imageBernd Bausch ( 2020-03-08 22:46:36 -0600 )edit

They should be the same? But why $ openstack volume list command can work?

rawmain gravatar imagerawmain ( 2020-03-09 00:08:05 -0600 )edit

OpenStack is case sensitive. One is the domain ID, the other the domain name (I never remember which is which). Have you tried running LS on the command line? Not the same as ls.

Why does the openstack client work? Not sure; perhaps it processes content of mycloud differently.

Bernd Bausch gravatar imageBernd Bausch ( 2020-03-09 01:25:16 -0600 )edit

You could try getting rid of project_domain_name and user_domain_name and replacing it with default_domain_name="default"in lower case (see bottom of page

Bernd Bausch gravatar imageBernd Bausch ( 2020-03-09 01:37:10 -0600 )edit