Ask Your Question
0

[trove][pike] Request needs authorization error

asked 2018-09-19 03:53:59 -0500

fedupwithneutron gravatar image

Hi,

Trove install on OpenStack Pike shows error in logs related to "Manager.publish_exists_event". Has anyone managed to install Trove on Pike without getting this error? Any help would be appreciated. Logs and config included below.

Thank you!

Trove Log:

2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task [-] Error during Manager.publish_exists_event: Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-5dece909-c107-491a-91fc-9eaa8c7b8a91)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task Traceback (most recent call last):
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/oslo_service/periodic_task.py", line 220, in run_periodic_tasks
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     task(self, context)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/trove/taskmanager/manager.py", line 433, in publish_exists_event
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     self.admin_context)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/trove/extensions/mgmt/instances/models.py", line 176, in publish_exist_events
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     notifications = transformer()
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/trove/extensions/mgmt/instances/models.py", line 268, in __call__
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     client=self.nova_client)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/trove/extensions/mgmt/instances/models.py", line 38, in load_mgmt_instances
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     mgmt_servers = client.servers.list(search_opts={'all_tenants': 1})
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 884, in list
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     "servers")
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 254, in _list
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     resp, body = self.api.client.get(url)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 288, in get
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     return self.request(url, 'GET', **kwargs)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 77, in request
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     **kwargs)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 447, in request
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 192, in request
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task     return self.session.request(url, method, **kwargs)
2018-09-19 16:42:31.337 8681 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
2018-09-19 ...
(more)
edit retag flag offensive close merge delete

Comments

The trove user needs to be an admin. You can see that from the log message

mgmt_servers = client.servers.list(search_opts={'all_tenants': 1}

(all_tenants requires admin privileges).

It looks like this is not the case in your deployment. Did you assign the admin role to trove?

Bernd Bausch gravatar imageBernd Bausch ( 2018-09-19 06:26:23 -0500 )edit

Hi Bernd,

I already executed this command as part of the install process:

# openstack role add --project service --user trove admin
fedupwithneutron gravatar imagefedupwithneutron ( 2018-09-19 06:48:32 -0500 )edit

I wonder how Trove authenticates with Keystone. One thing that surprises me is API v2 in the Keystone log. Can you enable showing credentials in Keystone's log? Keystone config option insecure_debug should do that.

Bernd Bausch gravatar imageBernd Bausch ( 2018-09-19 17:16:07 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-09-19 23:28:58 -0500

fedupwithneutron gravatar image

updated 2018-09-19 23:32:43 -0500

Hi Bernd,

Appreciate you being one of the most helpful folks around here! I managed to fix those errors.

What happened was that I was reading through and following devstack trove script on GH in its Pike branch, and somehow later while browsing I accidentally ended up following the instructions from master.

After correcting the configs, trove still gave errors in the logs. It is surprising that a fresh install is not working properly as intended. I had to make corrections myself in the trove code and config to get it running:

https://bugs.launchpad.net/trove/+bug...

https://git.openstack.org/cgit/openst...

https://ask.openstack.org/en/question...

Nobody bothered to fix and release this update as a package for Pike. Grrr..

Writing this as main answer since replying to a comment does not allow me to type this much.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-09-19 03:53:59 -0500

Seen: 94 times

Last updated: Sep 19 '18