Fails to create alarm with trust URL action

Bug #1555529 reported by Thomas Herve
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aodh
Fix Released
High
Thomas Herve

Bug Description

Tried this on master:

$ ceilometer alarm-create --name alarm1 --alarm-action trust+http://localhost:1234/ -m cpu --threshold 1
'NoneType' object has no attribute 'user_id' (HTTP 500) (Request-ID: req-19b78842-1f95-431d-9be6-eb4868a80573)

The traceback:

2016-03-10 10:41:31.639722 2016-03-10 10:41:31.639 17986 ERROR wsme.api [-] Server-side error: "'NoneType' object has no attribute 'user_id'". Detail:
2016-03-10 10:41:31.639740 Traceback (most recent call last):
2016-03-10 10:41:31.639742
2016-03-10 10:41:31.639743 File "/usr/lib/python2.7/site-packages/wsmeext/pecan.py", line 84, in callfunction
2016-03-10 10:41:31.639744 result = f(self, *args, **kwargs)
2016-03-10 10:41:31.639745
2016-03-10 10:41:31.639746 File "/opt/stack/aodh/aodh/api/controllers/v2/alarms.py", line 769, in post
2016-03-10 10:41:31.639747 data.update_actions()
2016-03-10 10:41:31.639748
2016-03-10 10:41:31.639749 File "/opt/stack/aodh/aodh/api/controllers/v2/alarms.py", line 406, in update_actions
2016-03-10 10:41:31.639750 auth_plugin)
2016-03-10 10:41:31.639750
2016-03-10 10:41:31.639751 File "/opt/stack/aodh/aodh/keystone_client.py", line 67, in create_trust_id
2016-03-10 10:41:31.639752 trustee_user_id = admin_client.auth_ref.user_id
2016-03-10 10:41:31.639753
2016-03-10 10:41:31.639754 AttributeError: 'NoneType' object has no attribute 'user_id'

Presumably the session refactoring went wrong.

Thomas Herve (therve)
Changed in aodh:
assignee: nobody → Thomas Herve (therve)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to aodh (master)

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

Changed in aodh:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to aodh (master)

Reviewed: https://review.openstack.org/291092
Committed: https://git.openstack.org/cgit/openstack/aodh/commit/?id=fcc5c91364dca2e7b50edb25fddc4a2dd1a12c29
Submitter: Jenkins
Branch: master

commit fcc5c91364dca2e7b50edb25fddc4a2dd1a12c29
Author: Thomas Herve <email address hidden>
Date: Thu Mar 10 11:34:22 2016 +0100

    Properly retrieve keystone user from admin client

    When using sessions, we need to get the user from the session instead of
    the auth plugin directly. This fixes an issue when creating alarms with
    trusts.

    Change-Id: I03cdabb9c2065414ef411b1a9b9b455a636004ac
    Closes-Bug: #1555529

Changed in aodh:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/aodh 2.0.0.0rc1

This issue was fixed in the openstack/aodh 2.0.0.0rc1 release candidate.

Liusheng (liusheng)
Changed in aodh:
importance: Undecided → High
milestone: none → mitaka-rc1
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.