notifier/zaqar.py use old auth_opts

Bug #1699468 reported by yuqian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aodh
Fix Released
Undecided
yuqian

Bug Description

Use zaqar notifier, this notifier posts alarm notifications either to a Zaqar subscription or to an existing Zaqar queue with a pre-signed URL.

You can use these commonds to show allocation:
# aodh alarm list
+-----------------+-----------------+------------------+-------+----------+---------+
| alarm_id | type | name | state | severity | enabled |
+-----------------+-----------------+------------------+-------+----------+---------+
| 9e980c0d-135d- | gnocchi_resourc | demo-aodh-cpu- | alarm | low | True |
| 42c6-ad2e- | es_threshold | util-alarm | | | |
| a9e9e95d06a2 | | | | | |
+-----------------+-----------------+------------------+-------+----------+---------+
# aodh alarm show ******
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| ok_actions | [u'zaqar://?topic=test_queue'] |
| alarm_actions | [u'zaqar://?topic=test_queue'] |
+------------------------------------------------------------------+
# openstack subscription list test_queue
+--------------------------+-----------------------------+-------------+---------+
| ID | Subscriber | TTL | Options |
+--------------------------+-----------------------------+-------------+---------+
| 594887d2b55f734518a5f39a | mailto:<email address hidden> | 68719476736 | {} |
| 594a19e2b55f734518a5f39c | mailto:<email address hidden> | 68719476736 | {} |
+--------------------------+-----------------------------+-------------+---------+

Then /var/log/aodh/notifier.log alarm ERROR:

2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar [-] Unknown error occurred; Failed to post message to Zaqar queue
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar Traceback (most recent call last):
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar File "/usr/lib/python2.7/site-packages/aodh/notifier/zaqar.py", line 146, in notify_zaqar
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar zaqar_client = self.client
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar File "/usr/lib/python2.7/site-packages/aodh/notifier/zaqar.py", line 134, in client
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar self._zclient = self.get_zaqar_client()
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar File "/usr/lib/python2.7/site-packages/aodh/notifier/zaqar.py", line 65, in get_zaqar_client
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar 'os_username': conf.os_username,
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 3061, in __getattr__
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar return self._conf._get(name, self._group)
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2672, in _get
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar value = self._do_get(name, group, namespace)
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2689, in _do_get
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar info = self._get_opt_info(name, group)
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2828, in _get_opt_info
2017-06-21 09:10:31.695 5502 ERROR aodh.notifier.zaqar raise NoSuchOptError(opt_name, group)

yuqian (roger-yu)
Changed in aodh:
assignee: nobody → yuqian (roger-yu)
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/493425

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/493425
Committed: https://git.openstack.org/cgit/openstack/aodh/commit/?id=20caf1c59eddb4e6f8fa5f394190c142d4ef2c6e
Submitter: Jenkins
Branch: master

commit 20caf1c59eddb4e6f8fa5f394190c142d4ef2c6e
Author: yuqian <email address hidden>
Date: Mon Aug 14 13:04:21 2017 +0800

    Replace the old auth_opts to the new in notifier/zaqar.py

    change os_username to username, change os_passwd to passwd, change os_tenant_name to project_name, change os_auth_url to auth_url

    Closes-Bug: #1699468

    Change-Id: Ic81d30fc90673053bb2ce7a55a491c54bcc6776d

Changed in aodh:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh 6.0.0

This issue was fixed in the openstack/aodh 6.0.0 release.

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.