it is bad to create a trust for every alarm creation

Bug #1575113 reported by Liusheng
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Aodh
Confirmed
Undecided
Unassigned

Bug Description

When we create a alarm with action with trust notifier, aodh will create trust, that may cause many created if we have many alarms, and mostly the trust parameters are same (trustor_user, trustee_user, project, role_names). it is better to reuse the trust created previously.

There is a obstacle to fix this issue. previously when delete the alarm we also delete the corresponding trust, if we reuse the trust, we need to delete the trust when last alarm with this trust is deleted.

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/413321

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

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

commit 2d157539244193ab7cedd890460689ccb170df55
Author: Zane Bitter <email address hidden>
Date: Tue Dec 20 19:24:34 2016 -0500

    Don't create multiple trust IDs per alarm

    Previously, if an alarm had multiple trust+ actions then we would create
    a new trust ID for each one. We would also create new trusts for them
    all each time the alarm was updated (even for actions that hadn't
    changed).

    With this change, we will only use a single trust ID for each alarm that
    contains one or more trust+ actions.

    Change-Id: Ib556ed3248221d6efb36f2117991c47e665ce336
    Partial-Bug: #1575113

Revision history for this message
Zane Bitter (zaneb) wrote :

Another reason it's bad: you can't create a trust from a trust token. So if the alarm triggers some automated change that results in the alarm being replaced, also using a trust token, then the new alarm won't be able to create a trust. (With the partial fix above, the alarm can at least be updated in place with a trust token, which was not the case before.)

Zane Bitter (zaneb)
Changed in aodh:
assignee: Zane Bitter (zaneb) → nobody
status: In Progress → Confirmed
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.