unable to use to openstack-cli after password change

Bug #1863137 reported by ltetrel
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MicroStack
Confirmed
Medium
Unassigned

Bug Description

Hi everyone and thanks for your work,

So when trying to use openstack-cli, for example :

microstack.openstack catalog list

I get the following error:

The request you have made requires authentication. (HTTP 401) (Request-ID: req-e69c05cc-efe0-4681-a867-aaec1160bfe3)

I already downloaded the openstackRC file and sourced it. Are they other steps to do to authentificate ?
Here is a copy of my openstackRC file :

#!/usr/bin/env bash
# To use an OpenStack cloud you need to authenticate against the Identity
# service named keystone, which returns a **Token** and **Service Catalog**.
# The catalog contains the endpoints for all services the user/tenant has
# access to - such as Compute, Image Service, Identity, Object Storage, Block
# Storage, and Networking (code-named nova, glance, keystone, swift,
# cinder, and neutron).
#
# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other
# OpenStack API is version 3. For example, your cloud provider may implement
# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is
# only for the Identity API served through keystone.
export OS_AUTH_URL=http://****:5000/v3/
# With the addition of Keystone we have standardized on the term **project**
# as the entity that owns the resources.
export OS_PROJECT_ID=a7845351d0204e71b7f34c6386a3bf5b
export OS_PROJECT_NAME="admin"
export OS_USER_DOMAIN_NAME="Default"
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
export OS_PROJECT_DOMAIN_ID="default"
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
# unset v2.0 items in case set
unset OS_TENANT_ID
unset OS_TENANT_NAME
# In addition to the owning entity (tenant), OpenStack stores the entity
# performing the action as the **user**.
export OS_USERNAME="****"
# With Keystone you pass the keystone password.
export OS_PASSWORD="****"
# If your configuration has multiple regions, we set that information here.
# OS_REGION_NAME is optional and only valid in certain environments.
export OS_REGION_NAME="microstack"
# Don't leave a blank variable, unset it if it was empty
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
export OS_INTERFACE=public
export OS_IDENTITY_API_VERSION=3

Revision history for this message
Pen Gale (pengale) wrote :

If you're running commands via microstack.openstack, you don't need to download or source an .rc file. microstack.openstack is actually a wrapper script that sources /var/snap/microstack/common/etc/microstack.rc, and then executes your command via the openstack cli.

Where did you download your .rc file from?

Changed in microstack:
status: New → Incomplete
Revision history for this message
ltetrel (ltetrel) wrote :

Hi Pete and thanks for your reply,

So I changed the /var/snap/microstack/common/etc/microstack.rc and it is now working !

Basically I changed my admin password so that is why it was not working anymore, but I fought I should use the .rc file from the openstack dashboard. So I think this should be documented somehow?

What I was used to do is to download the .rc file from the horizon dashboard:
* Click on the upper right button "Admin"
* In the scrolling menu click on "OpenStack RC File" to download the .rc file

Thank you you can close this "bug",

Revision history for this message
ltetrel (ltetrel) wrote : Re: [Bug 1863137] Re: enable to use to openstack-cli
Download full text (3.6 KiB)

Hi pete

Actually I have other question regarding our networking setup (not related
to this bug). We have trouble to access our instances from the outside.
Our provider has a pool of external floating IP. But when I configure an
external network in openstack to use them, I cannot ssh (port 22 is enabled
in our security group).

Can you point me to a good ressource for that ?

Thank you,

Le jeu. 13 févr. 2020 à 17:40, Pete Vander Giessen <
<email address hidden>> a écrit :

> If you're running commands via microstack.openstack, you don't need to
> download or source an .rc file. microstack.openstack is actually a
> wrapper script that sources
> /var/snap/microstack/common/etc/microstack.rc, and then executes your
> command via the openstack cli.
>
> Where did you download your .rc file from?
>
> ** Changed in: microstack
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1863137
>
> Title:
> enable to use to openstack-cli
>
> Status in MicroStack:
> Incomplete
>
> Bug description:
> Hi everyone and thanks for your work,
>
> So when trying to use openstack-cli, for example :
>
> microstack.openstack catalog list
>
> I get the following error:
>
> The request you have made requires authentication. (HTTP 401)
> (Request-ID: req-e69c05cc-efe0-4681-a867-aaec1160bfe3)
>
> I already downloaded the openstackRC file and sourced it. Are they other
> steps to do to authentificate ?
> Here is a copy of my openstackRC file :
>
> #!/usr/bin/env bash
> # To use an OpenStack cloud you need to authenticate against the Identity
> # service named keystone, which returns a **Token** and **Service
> Catalog**.
> # The catalog contains the endpoints for all services the user/tenant has
> # access to - such as Compute, Image Service, Identity, Object Storage,
> Block
> # Storage, and Networking (code-named nova, glance, keystone, swift,
> # cinder, and neutron).
> #
> # *NOTE*: Using the 3 *Identity API* does not necessarily mean any other
> # OpenStack API is version 3. For example, your cloud provider may
> implement
> # Image API v1.1, Block Storage API v2, and Compute API v2.0.
> OS_AUTH_URL is
> # only for the Identity API served through keystone.
> export OS_AUTH_URL=http://****:5000/v3/
> # With the addition of Keystone we have standardized on the term
> **project**
> # as the entity that owns the resources.
> export OS_PROJECT_ID=a7845351d0204e71b7f34c6386a3bf5b
> export OS_PROJECT_NAME="admin"
> export OS_USER_DOMAIN_NAME="Default"
> if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
> export OS_PROJECT_DOMAIN_ID="default"
> if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
> # unset v2.0 items in case set
> unset OS_TENANT_ID
> unset OS_TENANT_NAME
> # In addition to the owning entity (tenant), OpenStack stores the entity
> # performing the action as the **user**.
> export OS_USERNAME="****"
> # With Keystone you pass the keystone password.
> export OS_PASSWORD="****"
> # If your configuration has multiple regions, we set that...

Read more...

ltetrel (ltetrel)
summary: - enable to use to openstack-cli
+ unable to use to openstack-cli
summary: - unable to use to openstack-cli
+ unable to use to openstack-cli after password change
Pen Gale (pengale)
Changed in microstack:
status: Incomplete → Confirmed
Pen Gale (pengale)
Changed in microstack:
importance: Undecided → Medium
Revision history for this message
Pen Gale (pengale) wrote :

Keeping this open to publicly track documentation task. (Also dropped into Trello.)

@ltetrel: to address the networking question ... I'm not sure why it's not working. I'm not aware of any limitations in MicroStack that would prevent you from using an external flat network, given that you configure it properly using the Openstack tooling.

Most of the MicroStack services log to the system journal, so you can go looking for errors that might help you troubleshoot with `journalctl -xe`, as well as getting an overview with `systemctl status snap.microstack.*`. There are a few MicroStack services that log to /var/snap/microstack/common/log, so I'd look in there for error messages as well.

Revision history for this message
Cyber XML (cyberxml) wrote :

Confirming password change in Microstack/Openstack gui does not flow into /var/snap/microstack/common/etc/microstack.rc

snap-id: qMvFl14Ge7zDRxjx4AGmBgsa4pNL9cYW
tracking: latest/edge
refresh-date: 41 days ago, at 13:52 MDT
channels:
  latest/stable: –
  latest/candidate: –
  latest/beta: stein 2020-03-05 (196) 412MB classic
  latest/edge: stein 2020-03-05 (205) 389MB -
  rocky/stable: –
  rocky/candidate: –
  rocky/beta: –
  rocky/edge: rocky 2019-12-06 (195) 398MB classic
installed: stein (205) 389MB devmode

Revision history for this message
Ahmed Sabbir (asabbir) wrote :

Hi
when we change the rc file, then every time it asks for the admin password for any command in the CLI prompt. Any suggestion for that. Thank you so much

Revision history for this message
Ahmed Sabbir (asabbir) wrote :

Hi Pete,

I was able to create the external network but, to make it connected and accessible need to have the option of ovs-vsctl to put host's physical eth port under br-ex bridge. Could you please suggest how to do it?

Thank you so much.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.