[Horizon] openrc file is incorrect for v3

Bug #1595764 reported by Andrey Grebennikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
Paul Karikh
8.0.x
Fix Released
Medium
Paul Karikh
9.x
Fix Released
Medium
Paul Karikh

Bug Description

MOS8 + LDAP plugin

When using Keystone v3 authentication and the user logs into non-default domain.
User downloads RC file and expects it to be working.
In fact RC file contains v2.0 variables:

OS_AUTH_URL has v2.0
Domain info is absent.

Expected result:
No OS_TENANT_NAME and OS_TENANT_ID
OS_PROJECT_DOMAIN_NAME/ID present
OS_USER_DOMAIN_NAME/ID present
OS_IDENTITY_API_VERSION=3
OS_AUTH_URL ends with "IP:5000"

tags: added: customer-found
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

steps to reproduce

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Dina Belova (dbelova)
tags: added: area-horizon
Timur Sufiev (tsufiev-x)
Changed in mos:
milestone: none → 8.0-updates
importance: Undecided → Medium
Dina Belova (dbelova)
Changed in mos:
assignee: nobody → MOS Horizon (mos-horizon)
status: New → Confirmed
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/horizon (openstack-ci/fuel-8.0/liberty)

Fix proposed to branch: openstack-ci/fuel-8.0/liberty
Change author: David Lyle <email address hidden>
Review: https://review.fuel-infra.org/22855

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :
tags: added: ct-patched-8.0 ct1
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/horizon (openstack-ci/fuel-8.0/liberty)

Reviewed: https://review.fuel-infra.org/22855
Submitter: Pkgs Jenkins <email address hidden>
Branch: openstack-ci/fuel-8.0/liberty

Commit: 76f2a8a357c100ad816cdaaac2c67469cdcd17e7
Author: David Lyle <email address hidden>
Date: Mon Jul 4 09:23:32 2016

Adding download for openrc file for keystone v3

The existing openrc file download only works for keystone v2. Regardless
of whether v3 is enabled in Horizon.

This adds support for both. A v2.0 and a v3 compatible openrc file
download. A couple of different situations are covered.

1) support for keystone v2 only: OPENSTACK_API_VERSION={'identity': 2.0}
In this case only the v2 option is shown.

2) Use of keystone v3 in a potentially mixed environment. Since it is
possible to use keystone v2 and v3 in the same enviroment, having
OPENSTACK_API_VERSION={'identity': 3} displays options for downloading
v2 or v3 compatible openrc files.

Rationale for making the existing methods and urls support v3+. By
moving the v2.0 functionality to new version specific methods, they can
be more easily excised when v2 is obsolete and we're left with the newer
version support.

Change-Id: I29c62dc7436cc39adc1a4af9d90ceb6767e7a177
Closes-Bug: #1595764

tags: added: on-verification
Revision history for this message
Paul Karikh (pkarikh) wrote :

Here is second patch for this bug: https://review.fuel-infra.org/#/c/23037/

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote :

Reviewed: https://review.fuel-infra.org/23037
Submitter: Pkgs Jenkins <email address hidden>
Branch: openstack-ci/fuel-8.0/liberty

Commit: da80abc74f5d4ddcdcc21a0929c071b512343dae
Author: Matt Borland <email address hidden>
Date: Thu Jul 7 12:02:18 2016

Add valuable exports to openstack RC file download

See bug for details; these exports help inform the openstack client about
its environment.

Change-Id: I025bdbc31c9352f5894e0ce4cdba153a341d739b
Closes-Bug: 1595764

Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on MOS 8.0 + MU2 updates.

tags: removed: on-verification
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Release Note: a dedicated button to download Keystone V3 credentials was added to Horizon. It will be shown in case OPENSTACK_API_VERSION = {'identity': 3} in openstack_dashboard settings.

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/horizon (9.0/mitaka)

Fix proposed to branch: 9.0/mitaka
Change author: Matt Borland <email address hidden>
Review: https://review.fuel-infra.org/23652

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/horizon (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/23652
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: 5a488317c2735a33b67fcabc65da49ef2fe2e2ed
Author: Matt Borland <email address hidden>
Date: Tue Jul 26 09:28:24 2016

Add valuable exports to openstack RC file download

See bug for details; these exports help inform the openstack client about
its environment.

Change-Id: I025bdbc31c9352f5894e0ce4cdba153a341d739b
Closes-Bug: 1595764
(cherry picked from commit da80abc74f5d4ddcdcc21a0929c071b512343dae)

tags: added: on-verification
tags: removed: on-verification
Revision history for this message
Sergei Chipiga (schipiga) wrote :

Fixed for 9.x.

Downloaded v3 openrc file is correct:

#!/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://10.109.33.6: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=92204143177b411dbde848bde27b6149
export OS_PROJECT_NAME="test"
export OS_USER_DOMAIN_NAME="openldap1"
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; 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="user01"

# With Keystone you pass the keystone password.
echo "Please enter your OpenStack Password: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD=$OS_PASSWORD_INPUT

# 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="RegionOne"
# 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

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.