missing registry api tests for glance tasks

Bug #1364570 reported by Nikhil Komawar
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Nikhil Komawar
Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :

The tests when added to test_registry module cause the following error:

FAIL: glance.tests.functional.db.test_registry.TestTasksDriver.test_task_create
Traceback (most recent call last):
_StringException: Traceback (most recent call last):
  File "glance/tests/functional/db/base.py", line 1546, in test_task_create
    task = self.db_api.task_create(self.context, task_values)
  File "glance/db/registry/api.py", line 54, in wrapper
    return func(client, *args, **kwargs)
  File "glance/db/registry/api.py", line 273, in task_create
    return client.task_create(values=values, session=session)
  File "glance/common/rpc.py", line 274, in method_proxy
    return self.do_request(item, **kw)
  File "glance/common/rpc.py", line 256, in do_request
    raise exc_cls(error['val'])
Forbidden: Forbidding request, task 66b83163-6e3a-4f5e-89c6-2e28cb002926 is not visible

The root cause for this is the different request owner when making registry api calls and when creating tasks:-
2014-09-02 16:45:05,333 INFO 2014-09-02 16:45:05.308 84135 WARNING glance.db.sqlalchemy.api [-] owner user, tenant user, task owner cc724434-02df-4bc4-98ee-8c052e35f6f2

Either the task tests for db.base are not setup correctly (as per the similar images tests) or there is something wrong about the way request is being made. Will do a bit more digging soon.

Changed in glance:
assignee: nobody → nikhil komawar (nikhil-komawar)
Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :

have a patch ready, waiting on https://review.openstack.org/#/c/44355 to merge first

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/119434
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=7847b7e866ae6465f8f50d68a450d00b2cb7c4af
Submitter: Jenkins
Branch: master

commit 7847b7e866ae6465f8f50d68a450d00b2cb7c4af
Author: Nikhil Komawar <email address hidden>
Date: Wed Sep 3 19:20:44 2014 -0400

    Adds missing db registry api tests for Tasks

    The db registry api supports calls to Glance tasks. This patch
    adds test coverage to that part of the code.

    Fixes bug 1364570

    Change-Id: Id7a74239a54d9001c7ac4ab4c8e2b67ac0686125

Changed in glance:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in glance:
milestone: none → juno-rc1
Dolph Mathews (dolph)
Changed in glance:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: juno-rc1 → 2014.2
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.