Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1101320

Summary: `keystone token-get` produces 'NoneType' object has no attribute 'has_service_catalog'
Product: Red Hat OpenStack Reporter: Jan Hutař <jhutar>
Component: python-keystoneclientAssignee: Jamie Lennox <jlennox>
Status: CLOSED NEXTRELEASE QA Contact: Udi Kalifon <ukalifon>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 5.0 (RHEL 7)CC: aberezin, ayoung, dhill, jruzicka, lobo, nkinder, rharwood, scohen, yeylon
Target Milestone: z5Keywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-13 01:30:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Hutař 2014-05-26 21:28:40 UTC
Description of problem:
I have followed manual and noticed this error.


Version-Release number of selected component (if applicable):
python-keystoneclient-0.8.0-2.el7ost.noarch
openstack-keystone-2014.1-2.el7ost.noarch
python-keystone-2014.1-2.el7ost.noarch


How reproducible:
always in one mine terminal


Steps to Reproduce:
1. Follow manual to install RHOS5 @ RHEL7:
   ftp://ftp.redhat.com/redhat/rhel-osp/beta/5/el7/readme.txt
   https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/5/html-single/Installation_and_Configuration_Guide/index.html
      III. Install OpenStack Services Manually
        7. OpenStack Identity Service Installation
2. # source keystonerc_admin
3. # source keystonerc_user
4. # keystone token-get
   WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
   'NoneType' object has no attribute 'has_service_catalog'


Actual results:
Full traceback is:
Traceback (most recent call last):
  File "/usr/bin/keystone", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/keystoneclient/shell.py", line 485, in main
    OpenStackIdentityShell().main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/keystoneclient/shell.py", line 427, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v2_0/shell.py", line 39, in wrapped
    if not kc.has_service_catalog():
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 282, in has_service_catalog
    return self.auth_ref.has_service_catalog()
AttributeError: 'NoneType' object has no attribute 'has_service_catalog'


Expected results:
No traceback should be there

Comment 3 Adam Young 2014-05-27 21:20:36 UTC
The problem is that the keystone token-get command is using the wrong credentials.  It is using the ADMIN_TOKEN, not the token as the end user.

The keystone client will use the SERVICE_TOKEN value over the user specific values of OS_USERNAME etc.

Run the following commands

unset OS_SERVICE_ENDPOINT
unset OS_ENDPOINT
unset OS_SERVICE_TOKEN
unset SERVICE_TOKEN


(this is a little redundant, but unsets both the old and new versions of the environment variables.)

These values can be added to the keystonerc_user  file in the documentation.

Comment 4 David Hill 2014-08-25 21:58:35 UTC
Well, we have an issue here as :
[root@stv-lab-ctrl02 ~]# keystone token-get
Expecting a token provided via either --os-token or env[OS_SERVICE_TOKEN]

I have this issue where with 2014.1.2 , keystone v3 api doesn't seem to provide the catalog for some reasons.

Comment 8 Jamie Lennox 2015-04-13 01:30:15 UTC
This was fixed (as linked by the gerrit review and upstream bug) and released in the python-keystoneclient 1.0 release on 2014-12-19. This should be included in the kilo release. 

Marking closed, next release but i'm not sure where to set the milestone.