[Bug 1831181] Re: [aodh.notifier] Not setting user_domain_id raises keystone error: The resource could not be found.

Jorge Niedbalski 1831181 at bugs.launchpad.net
Mon Jul 22 21:20:07 UTC 2019


@sil2100

updated SRU template as requested.

** Description changed:

  [Environment]
  
  Xenial/Queens
  
  [Description]
  
  If no user_domain_id is provided then, the following exception will be raised by the
  aodh-notifier component:
  
  $ openstack alarm-history show 1424b6fb-1d9d-4d69-b00a-ad455aad0ecb
  
  ==> /var/log/aodh/aodh-notifier.log <==
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 201, in get_auth_ref
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     return self._plugin.get_auth_ref(session, **kwargs)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py", line 63, in get_auth_ref
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     authenticated=False, log=False)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 848, in post
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     return self.request(url, 'POST', **kwargs)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 737, in request
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     raise exceptions.from_response(resp, method, url)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier NotFound: (http://10.5.0.36:35357/v2.0/tokens): The resource could not be found. (HTTP 404) (Request-ID: req-50d54903-d2af-4fd1-be68-a92498d91b85)
- 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier 
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier
  
  Domain configuration for the aodh service is as follows:
  
- root at juju-95497c-controller-1:/home/ubuntu# grep domain /etc/aodh/aodh.conf 
+ root at juju-95497c-controller-1:/home/ubuntu# grep domain /etc/aodh/aodh.conf
  gnocchi_external_domain_name = service_domain
  project_domain_name = service_domain
  user_domain_name = service_domain
  
+ [Test Case]
+ 
+ 1) Configure aodh service with the following configuration
+ 
+ root at juju-95497c-controller-1:/home/ubuntu# grep domain /etc/aodh/aodh.conf
+ gnocchi_external_domain_name = service_domain
+ project_domain_name = service_domain
+ user_domain_name = service_domain
+ 
+ 2) Check the alarm history
+ 
+ ubuntu at niedbalski-bastion:~/cases/229352$ openstack alarm-history show
+ 1424b6fb-1d9d-4d69-b00a-ad455aad0ecb
+ 
+ ==> /var/log/aodh/aodh-notifier.log <==
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 201, in get_auth_ref
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier return self._plugin.get_auth_ref(session, **kwargs)
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py", line 63, in get_auth_ref
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier authenticated=False, log=False)
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 848, in post
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier return self.request(url, 'POST', **kwargs)
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 737, in request
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier raise exceptions.from_response(resp, method, url)
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier NotFound: (http://10.5.0.36:35357/v2.0/tokens): The resource could not be found. (HTTP 404) (Request-ID: req-50d54903-d2af-4fd1-be68-a92498d91b85)
+ 2019-05-31 02:07:26.663 15274 ERROR aodh.notifier
+ 
+ *** With the patch applied the latest traceback doesn't gets generated.
+ 
+ 
+ [Regression Potential] 
+ 
+  * None has been identified
+ 
+ 
  ### Explanation
  
- The following line https://github.com/openstack/aodh/blob/master/aodh/keystone_client.py#L51 
+ The following line https://github.com/openstack/aodh/blob/master/aodh/keystone_client.py#L51
  enforces the existence of the user_domain_id for getting the authenticated keystone session.
  
  [Proposed Solution]
  
  * Use user_domain_name as a fallback if no user_domain_id is provided.
  * The charm templates should provide only user_domain_id if provided orelse
  fallback to user_domain_name.

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1831181

Title:
  [aodh.notifier] Not setting user_domain_id raises keystone error: The
  resource could not be found.

Status in Aodh:
  New
Status in OpenStack AODH Charm:
  Fix Committed
Status in charm-interface-keystone:
  Fix Released
Status in Ubuntu Cloud Archive:
  Triaged
Status in Ubuntu Cloud Archive mitaka series:
  Triaged
Status in Ubuntu Cloud Archive ocata series:
  Triaged
Status in Ubuntu Cloud Archive queens series:
  Triaged
Status in Ubuntu Cloud Archive rocky series:
  Triaged
Status in Ubuntu Cloud Archive stein series:
  Triaged
Status in Ubuntu Cloud Archive train series:
  Fix Released
Status in aodh package in Ubuntu:
  Fix Committed
Status in aodh source package in Bionic:
  Triaged
Status in aodh source package in Disco:
  Triaged
Status in aodh source package in Eoan:
  Fix Committed

Bug description:
  [Environment]

  Xenial/Queens

  [Description]

  If no user_domain_id is provided then, the following exception will be raised by the
  aodh-notifier component:

  $ openstack alarm-history show 1424b6fb-1d9d-4d69-b00a-ad455aad0ecb

  ==> /var/log/aodh/aodh-notifier.log <==
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 201, in get_auth_ref
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     return self._plugin.get_auth_ref(session, **kwargs)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py", line 63, in get_auth_ref
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     authenticated=False, log=False)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 848, in post
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     return self.request(url, 'POST', **kwargs)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier   File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 737, in request
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier     raise exceptions.from_response(resp, method, url)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier NotFound: (http://10.5.0.36:35357/v2.0/tokens): The resource could not be found. (HTTP 404) (Request-ID: req-50d54903-d2af-4fd1-be68-a92498d91b85)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier

  Domain configuration for the aodh service is as follows:

  root at juju-95497c-controller-1:/home/ubuntu# grep domain /etc/aodh/aodh.conf
  gnocchi_external_domain_name = service_domain
  project_domain_name = service_domain
  user_domain_name = service_domain

  [Test Case]

  1) Configure aodh service with the following configuration

  root at juju-95497c-controller-1:/home/ubuntu# grep domain /etc/aodh/aodh.conf
  gnocchi_external_domain_name = service_domain
  project_domain_name = service_domain
  user_domain_name = service_domain

  2) Check the alarm history

  ubuntu at niedbalski-bastion:~/cases/229352$ openstack alarm-history show
  1424b6fb-1d9d-4d69-b00a-ad455aad0ecb

  ==> /var/log/aodh/aodh-notifier.log <==
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 201, in get_auth_ref
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier return self._plugin.get_auth_ref(session, **kwargs)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py", line 63, in get_auth_ref
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier authenticated=False, log=False)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 848, in post
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier return self.request(url, 'POST', **kwargs)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 737, in request
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier raise exceptions.from_response(resp, method, url)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier NotFound: (http://10.5.0.36:35357/v2.0/tokens): The resource could not be found. (HTTP 404) (Request-ID: req-50d54903-d2af-4fd1-be68-a92498d91b85)
  2019-05-31 02:07:26.663 15274 ERROR aodh.notifier

  *** With the patch applied the latest traceback doesn't gets
  generated.

  
  [Regression Potential] 

   * None has been identified

  
  ### Explanation

  The following line https://github.com/openstack/aodh/blob/master/aodh/keystone_client.py#L51
  enforces the existence of the user_domain_id for getting the authenticated keystone session.

  [Proposed Solution]

  * Use user_domain_name as a fallback if no user_domain_id is provided.
  * The charm templates should provide only user_domain_id if provided orelse
  fallback to user_domain_name.

To manage notifications about this bug go to:
https://bugs.launchpad.net/aodh/+bug/1831181/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list