AttributeError: auth_ref when trying to do user create

Bug #1494413 reported by Thomas Goirand
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Low
Matthew Edmonds

Bug Description

It's looking like openstackclient fails on me, whatever command I do. Here's an example trying to do "user create", but I have the issue with all other keystone commands. I didn't try any other command.

Note that I have replaced my actual public IP by "MY-IP" below.

$ openstack --debug user create toto
DEBUG: openstackclient.shell options: Namespace(auth_type='', auth_url='http://MY-IP:5000/v2.0/', cacert='', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_compute_api_version='', os_identity_api_version='', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', password='XXXXXX', project_domain_id='', project_domain_name='', project_id='', project_name='admin', region_name='', service_provider_endpoint='', timing=False, token='', trust_id='', url='', user_domain_id='', user_domain_name='', user_id='', username='admin', verbose_level=3, verify=None)
DEBUG: openstackclient.shell defaults: {'auth_type': 'osc_password', 'compute_api_version': '2', 'database_api_version': '1.0', 'api_timeout': None, 'baremetal_api_version': '1', 'cacert': None, 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'key': None, 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '1', 'verify': True, 'identity_api_version': '2', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'dns_api_version': '2', 'disable_vendor_agent': {}}
DEBUG: openstackclient.shell cloud cfg: {'auth_type': 'osc_password', 'compute_api_version': '2', 'database_api_version': '1.0', 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '1', 'verify': True, 'timing': False, 'dns_api_version': '2', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, 'baremetal_api_version': '1', 'auth': {'username': 'admin', 'tenant_name': 'admin', 'project_name': 'admin', 'password': 'XXXXXX', 'auth_url': 'http://MY-IP:5000/v2.0/'}, 'default_domain': 'default', 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'key': None, 'cacert': None, 'deferred_help': False, 'identity_api_version': '2', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'debug': True, 'disable_vendor_agent': {}}
DEBUG: openstackclient.shell compute API version 2, cmd group openstack.compute.v2
DEBUG: openstackclient.shell network API version 2, cmd group openstack.network.v2
DEBUG: openstackclient.shell image API version 1, cmd group openstack.image.v1
DEBUG: openstackclient.shell volume API version 1, cmd group openstack.volume.v1
DEBUG: openstackclient.shell identity API version 2, cmd group openstack.identity.v2
DEBUG: openstackclient.shell object_store API version 1, cmd group openstack.object_store.v1
INFO: openstackclient.shell command: user create -> openstackclient.identity.v2_0.user.CreateUser
DEBUG: openstackclient.api.auth Auth plugin osc_password selected
DEBUG: openstackclient.api.auth auth_type: osc_password
INFO: openstackclient.common.clientmanager Using auth plugin: osc_password
DEBUG: openstackclient.common.clientmanager Using parameters {'username': 'admin', 'tenant_name': 'admin', 'password': 'XXXXXX', 'project_name': 'admin', 'auth_url': 'http://MY-IP:5000/v2.0/'}
DEBUG: openstackclient.common.clientmanager Get auth_ref
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://MY-IP:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-openstackclient"
INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): MY-IP
DEBUG: requests.packages.urllib3.connectionpool "GET /v2.0/ HTTP/1.1" 200 341
ERROR: openstack auth_ref
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 367, in run_subcommand
    self.prepare_to_run_command(cmd)
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 360, in prepare_to_run_command
    self.client_manager.auth_ref
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/clientmanager.py", line 64, in __getattr__
    raise AttributeError(name)
AttributeError: auth_ref
DEBUG: openstackclient.shell clean_up CreateUser: auth_ref
ERROR: openstackclient.shell Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 152, in run
    return super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 255, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 367, in run_subcommand
    self.prepare_to_run_command(cmd)
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 360, in prepare_to_run_command
    self.client_manager.auth_ref
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/clientmanager.py", line 64, in __getattr__
    raise AttributeError(name)
AttributeError: auth_ref

Revision history for this message
Steve Martinelli (stevemar) wrote :

are you still hitting this problem? there were some issues with openstackclient and os-client-config earlier on, but it should be stabilized now that liberty has been released.

Changed in python-openstackclient:
status: New → Incomplete
Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Incomplete → Invalid
Revision history for this message
latenite4 (rnm) wrote :

I think i still see this problem on a Kilo install on Ubuntu 14.04.
When I try to do CLI 'openstack user list' with --debug, I get AttributeError: auth_ref

Why was the status marked Invalid?
I just did update/upgrade from ubuntu repo today and still have the problem.
Do you agree it is a bug and will it be fixed?

thx,
Rod

Changed in python-openstackclient:
status: Invalid → Confirmed
Revision history for this message
Matthew Edmonds (edmondsw) wrote :

I hit this as well, and dug in and found the problem. The version of keystoneauth1 that I have (2.2.0) is calling auth.get_connection_params() from session.py's Session.get_auth_connection_params(), but the version of keystoneclient that I have (1.6.0) does not have that method yet. It was added to keystoneclient/auth/base.py in keystoneclient 1.7.0.

openstackclient's requirements.txt says that keystoneclient 1.6.0 should be ok, but also requires keystoneauth1 >= 2.1.0. I don't think that keystoneclient 1.6.0 would ever work with keytoneauth1 >= 2.1.0, so openstackclient should require at least keystoneclient 1.7.0.

should keystoneauth1 also require at least keystoneclient 1.6.0? It currently doesn't even list keystoneclient as a requirement, at any version.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

I don't have the problem as I have upgraded all compontents to the max that upper-constraints.txt says. But as Matthew wrote, probably there was an issue with the lowest bound.

Revision history for this message
Matthew Edmonds (edmondsw) wrote :

this doesn't seem to be an issue with keystoneclient 1.7.0, so I think we just need to move global requirements to keystoneclient>=1.7.0

Revision history for this message
Matthew Edmonds (edmondsw) wrote :
no longer affects: keystoneauth
Changed in python-openstackclient:
assignee: nobody → Matthew Edmonds (edmondsw)
Changed in python-openstackclient:
status: Confirmed → In Progress
Revision history for this message
Steve Martinelli (stevemar) wrote :

global requirements has been upped to keystoneclient>=1.7.0

Changed in python-openstackclient:
status: In Progress → Fix Released
importance: Undecided → Low
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.