Microstack command line api not working

Unable to use the commandline for any user, after sourcing user-openrc.sh.

Most likely microstack init did not configure it properly.

I am getting the following response in every command:

microstack.openstack flavor list
The request you have made requires authentication. (HTTP 401) (Request-ID: req-44be8ba3-38bb-4c48-b1dd-548d5a2afee0)

openrc exports OS_AUTH_URL=

but /snap/microstack/current/etc/glance/glance-api.conf does not set auth_url or any other parameters

MicroStack tries to be helpful, and let you skip the step of sourcing the openrc, by providing its own .rc file in /var/snap/microstack/common/etc/microstack.rc. The wrapper around the microstack.openstack command will source this rc automatically for you.

Does the command work if you start in a clean terminal, without sourcing the openrc that you downloaded?

If so, you might want to file a bug against MicroStack – the openrc file you get from the dashboard might be missing a bit of info necessary for making the command work.

1 Like

Hi, I am surprised that it worked initially right after the installation according to https://ubuntu.com/tutorials/microstack-get-started#2-install-microstack and MicroStack - OpenStack in a snap
But, after few minutes I am facing the above mentioned issue for every command.
I just changed the password in GUI interface. Nothing more. Could you please help me on that? Thanks in advance

You can probably fix the microstack command line tools by running:

sudo snap set microstack config.credentials.keystone-password=<your password>

That will prompt microstack to overwrite the default password in its .rc with the new password.

You can then do a comparison between /var/snap/microstack/common/etc/microstack.rc and the rc you downloaded, and file any missing pieces in the downloaded rc as a bug against MicroStack.