determining oslo_config_project changed in commit f8c150a9cc9b407b2df87244daf3342177260e90

Bug #1594930 reported by Alfredo Moralejo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Aodh
Invalid
Undecided
Unassigned
keystonemiddleware
Fix Released
High
Thomas Herve

Bug Description

I'm installing aodh from master repo. I'm using following configuration for aodh.conf:

[DEFAULT]
debug = True
log_dir = /var/log/aodh
rpc_backend = rabbit

[oslo_messaging_notifications]
topics = notifications

[oslo_policy]
policy_file = /etc/aodh/policy.json

[service_credentials]
auth_url = http://localhost:5000/
region_name = RegionOne
project_name = services
password = 470ba4223ca94df3
project_domain_id = default
user_domain_id = default
username = aodh
auth_type = password

[oslo_messaging_rabbit]
rabbit_host = 127.0.0.1
rabbit_port = 5672
rabbit_use_ssl = True
rabbit_userid = guest
rabbit_password = guest

[keystone_authtoken]
auth_uri = http://127.0.0.1:5000
project_domain_name = Default
project_name = services
user_domain_name = Default
password = 470ba4223ca94df3
username = aodh
auth_url = http://127.0.0.1:35357
auth_type = password

[database]
connection = mongodb://192.168.121.96:27017/aodh

[api]
pecan_debug = False

When i try to list alarms (or any other api call), i get following error from cli:

# aodh alarm list
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 324, in getMessage
    msg = str(self.msg)
  File "/usr/lib/python2.7/site-packages/aodhclient/exceptions.py", line 32, in __str__
    formatted_string = "%s (HTTP %s)" % (self.message, self.http_status)
AttributeError: 'ClientException' object has no attribute 'http_status'
Logged from file app.py, line 351

And i see following messages in apache error log:

[Tue Jun 21 14:02:14.399675 2016] [:error] [pid 1333] [remote 192.168.121.96:212] return self.request(url, 'GET', **kwargs)
[Tue Jun 21 14:02:14.399679 2016] [:error] [pid 1333] [remote 192.168.121.96:212] File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 94, in inner
[Tue Jun 21 14:02:14.399685 2016] [:error] [pid 1333] [remote 192.168.121.96:212] return func(*args, **kwargs)
[Tue Jun 21 14:02:14.399690 2016] [:error] [pid 1333] [remote 192.168.121.96:212] File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 544, in request
[Tue Jun 21 14:02:14.399696 2016] [:error] [pid 1333] [remote 192.168.121.96:212] resp = send(**kwargs)
[Tue Jun 21 14:02:14.399700 2016] [:error] [pid 1333] [remote 192.168.121.96:212] File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 582, in _send_request
[Tue Jun 21 14:02:14.399707 2016] [:error] [pid 1333] [remote 192.168.121.96:212] raise exceptions.SSLError(msg)
[Tue Jun 21 14:02:14.399722 2016] [:error] [pid 1333] [remote 192.168.121.96:212] SSLError: SSL exception connecting to https://127.0.0.1:35357: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:765)

Note that it's trying to connect to https://127.0.0.1:35357 while i've configured http://127.0.0.1:35357.

If i revert keystonemiddleware to a commit before https://github.com/openstack/keystonemiddleware/commit/f8c150a9cc9b407b2df87244daf3342177260e90, it works fine.

For example using, https://github.com/openstack/keystonemiddleware/commit/20b4a87e874361d6e28076b994ec06d472dfb0b3:

# aodh alarm list
+--------------------------------------+-----------+--------+-------------------+----------+---------+
| alarm_id | type | name | state | severity | enabled |
+--------------------------------------+-----------+--------+-------------------+----------+---------+
| f2d98900-1298-49af-ab86-0d41deea90f6 | threshold | alarm1 | insufficient data | low | True |
+--------------------------------------+-----------+--------+-------------------+----------+---------+

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

It's actually an issue in keystonemiddleware with the patch you linked.

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

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

Changed in keystonemiddleware:
assignee: nobody → Thomas Herve (therve)
status: New → In Progress
Changed in aodh:
status: New → Invalid
Changed in keystonemiddleware:
importance: Undecided → High
summary: - aodh fails with keystonemiddleware after commit
+ determining oslo_config_project changed in commit
f8c150a9cc9b407b2df87244daf3342177260e90
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystonemiddleware (master)

Reviewed: https://review.openstack.org/332459
Committed: https://git.openstack.org/cgit/openstack/keystonemiddleware/commit/?id=2798b2ebdf56a63ad1c20b3b0d7d2f0b1f1368a5
Submitter: Jenkins
Branch: master

commit 2798b2ebdf56a63ad1c20b3b0d7d2f0b1f1368a5
Author: Thomas Herve <email address hidden>
Date: Tue Jun 21 22:00:02 2016 +0200

    Fix an issue with oslo_config_project paste config

    When oslo_config_project is specified in the paste config, we need to
    lookup the configuration file properly. Commit
    f8c150a9cc9b407b2df87244daf3342177260e90 changed the way we looked up
    for the default config files, and passed an empty list instead of None,
    which means that no look were done anymore. This restores the previous
    behavior.

    Change-Id: I6aec548cec24dfcd48e4c116c07f53cc097c6059
    Closes-Bug: #1594930

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

This issue was fixed in the openstack/keystonemiddleware 4.6.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.