Search code examples
cloudconfigopenstackopenstack-nova

OpenStack Python CLI - Clouds Config Not Recognized By "nova"


I have my clouds config clearly defined in ~/.config/openstack/clouds.yaml

Running the CLI openstack command works fine (eg: openstack domains list, etc.)

Trying to run the CLI nova command (eg: nova service-list) returns 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).

Shouldn't nova use the same clouds.yaml config?

Note: This happens on all clouds (switching them with export OS_CLOUD=<name>) and only fails for nova..

EDIT: This is not a devstack deployment I can control. I only have the config information for each cloud and admin credentials for making changes as needed.


Solution

  • You should use the openstack-commands, because the client-libraries like the nova-command are deprecated. So use openstack compute service list instead of nova service-list.

    Beside this the nova-command also need the same authentification, like the openstack-command, so if your login credentials are in the cloud.yaml, then your nova-command need this too.