heatclient auth url attribute error

Bug #1632341 reported by Ryan Hallisey
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-heatclient
In Progress
Medium
Rabi Mishra

Bug Description

'Token' object has no attribute 'auth_url'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 59, in run
    return self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_update.py", line 83, in take_action
    heatclient=clients.orchestration,
  File "/usr/lib/python2.7/site-packages/osc_lib/clientmanager.py", line 53, in __get__
    six.reraise(new_err.__class__, new_err, sys.exc_info()[2])
  File "/usr/lib/python2.7/site-packages/osc_lib/clientmanager.py", line 48, in __get__
    self._handle = self.factory(instance)
  File "/usr/lib/python2.7/site-packages/heatclient/osc/plugin.py", line 51, in make_client
    'auth_url': instance.auth.auth_url,
PluginAttributeError: 'Token' object has no attribute 'auth_url'
clean_up UpdateOvercloud: 'Token' object has no attribute 'auth_url'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 267, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 59, in run
    return self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_update.py", line 83, in take_action
    heatclient=clients.orchestration,
  File "/usr/lib/python2.7/site-packages/osc_lib/clientmanager.py", line 53, in __get__
    six.reraise(new_err.__class__, new_err, sys.exc_info()[2])
  File "/usr/lib/python2.7/site-packages/osc_lib/clientmanager.py", line 48, in __get__
    self._handle = self.factory(instance)
  File "/usr/lib/python2.7/site-packages/heatclient/osc/plugin.py", line 51, in make_client
    'auth_url': instance.auth.auth_url,
PluginAttributeError: 'Token' object has no attribute 'auth_url'

Revision history for this message
Thomas Herve (therve) wrote :

Can you develop? How did that happen, what's your version, what's your environment, etc?

affects: heat → python-heatclient
Changed in python-heatclient:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Ryan Hallisey (rthall14) wrote :

Talked with ramishra about the issue. I believe the issue is coming from the tripleoclient side where the keystone token is being set somewhere during an update. The deployment worked fine so I don't think this is a heatclient issue.

Changed in python-heatclient:
status: Incomplete → Invalid
Revision history for this message
Rabi Mishra (rabi) wrote :

I think this is a case where Token[1] auth plugin is used where you have a known endpoint and admin token that you want to use. Though not sure why/how tripleoclient is using it.

I'll have a look at it.

[1] https://github.com/openstack/keystoneauth/blob/master/keystoneauth1/token_endpoint.py#L19

Changed in python-heatclient:
assignee: nobody → Rabi Mishra (rabi)
status: Invalid → Confirmed
Revision history for this message
Rabi Mishra (rabi) wrote :

I tried to reproduce this without any luck. Though there is a code path for the token_endpoint auth plugin, I'm not sure how it gets called.

The bug reporter confirmed of not seeing the issue again. So probably there was some issue with the environment. Marking this invalid for the time being, we can probably reopen it, if required.

Changed in python-heatclient:
assignee: Rabi Mishra (rabi) → nobody
status: Confirmed → Invalid
Revision history for this message
Ian Pilcher (arequipeno) wrote :

I am getting this when trying to run "openstack overcloud stack update ..."

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 267, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 59, in run
    return self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_update.py", line 83, in take_action
    heatclient=clients.orchestration,
  File "/usr/lib/python2.7/site-packages/osc_lib/clientmanager.py", line 53, in __get__
    six.reraise(new_err.__class__, new_err, sys.exc_info()[2])
  File "/usr/lib/python2.7/site-packages/osc_lib/clientmanager.py", line 48, in __get__
    self._handle = self.factory(instance)
  File "/usr/lib/python2.7/site-packages/heatclient/osc/plugin.py", line 45, in make_client
    'auth_url': instance.auth.auth_url,
PluginAttributeError: 'Token' object has no attribute 'auth_url'

Rabi Mishra (rabi)
Changed in python-heatclient:
assignee: nobody → Rabi Mishra (rabi)
status: Invalid → New
Revision history for this message
Rabi Mishra (rabi) wrote :

From the logs it seems to be using the 'auth_type': 'token_endpoint' and no session.

I could see in your trace where the url is 'x', which tells me something is wrong with your setup.

Using auth plugin: token_endpoint
Using parameters {'url': 'x', 'token': '***', 'project_name': 'admin'}

When I try to use token_endpoint plugin, I get the below in the trace:

Using auth plugin: token_endpoint
Using parameters {'url': 'http://192.168.1.61:8004/v1/admin', 'token': '***', 'project_name': 'admin'}

We can put a hack[1] to check for the auth_plugin_name=token_endpoint and then populate the kwargs, but that would probably not solve your issue.

[1]
 if instance.auth_plugin_name == 'token_endpoint':
          kwargs.update('endpoint': url,
                        'token': instance.auth.token})

I think Ryan(who initially reported this) did not notice the issue when he tried with a fresh setup.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/389069

Changed in python-heatclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-heatclient 1.16.1

This issue was fixed in the openstack/python-heatclient 1.16.1 release.

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

Other bug subscribers

Bug attachments

Remote bug watches

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