This is the step to reproduce, where ~/openrc.admin contains auth info for admin user of containerized openstack:
# source to openrc and run cmd, error indicate auth info needed.
controller-0:~$ source ~/openrc.admin ; nova list
ERROR (CommandError): You must provide a user name/id (via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]) or an auth token (via --os-token).
command terminated with exit code 1
# run cmd with auth info provided via cmdline works though:
nova --os-username 'admin' --os-password 'Li69nux*' --os-project-name admin --os-auth-url http://keystone.openstack.svc.cluster.local/v3 --os-user-domain-name Default --os-project-domain-name Default --os-endpoint-type internalURL --os-region-name RegionOne list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
This is the step to reproduce, where ~/openrc.admin contains auth info for admin user of containerized openstack:
# source to openrc and run cmd, error indicate auth info needed.
controller-0:~$ source ~/openrc.admin ; nova list
ERROR (CommandError): You must provide a user name/id (via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]) or an auth token (via --os-token).
command terminated with exit code 1
## openrc file contains following:
unset OS_SERVICE_TOKEN
export OS_ENDPOINT_ TYPE=internalUR L ENDPOINT_ TYPE=internalUR L
export CINDER_
export OS_USERNAME=admin `TERM=linux /opt/platform/ .keyring/ 19.01/. CREDENTIAL 2>/dev/null` TYPE=password keystone. openstack. svc.cluster. local/v3
export OS_PASSWORD=
export OS_AUTH_
export OS_AUTH_URL=http://
export OS_PROJECT_ NAME=admin DOMAIN_ NAME=Default DOMAIN_ NAME=Default API_VERSION= 3 NAME=RegionOne internal
export OS_USER_
export OS_PROJECT_
export OS_IDENTITY_
export OS_REGION_
export OS_INTERFACE=
# run cmd with auth info provided via cmdline works though: keystone. openstack. svc.cluster. local/v3 --os-user- domain- name Default --os-project- domain- name Default --os-endpoint-type internalURL --os-region-name RegionOne list -----+- ------- +------ ------+ ------- ------+ ------- ---+ -----+- ------- +------ ------+ ------- ------+ ------- ---+ -----+- ------- +------ ------+ ------- ------+ ------- ---+
nova --os-username 'admin' --os-password 'Li69nux*' --os-project-name admin --os-auth-url http://
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-