Recent TaskLog refactor work on sqlalchemy/api.py has broken Instance Usage Audit Log extension

Bug #1102652 reported by Tiago Mello
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Tiago Mello

Bug Description

The recent changes made by the commit: https://review.openstack.org/#/c/19095 has broken the extension.

Revision history for this message
Tiago Mello (timello) wrote :

It seems the method signature has been changed and it hasn't been reflected on db/api.py. The method 'task_log_get_all' still contains 'session' parameter.

Tiago Mello (timello)
Changed in nova:
assignee: nobody → Tiago Rodrigues de Mello (tmello)
Revision history for this message
Boris Pavlovic (boris-42) wrote :

Would you remove session from db.api?

Revision history for this message
Tiago Mello (timello) wrote :

Also, the 'context' parameter is no longer been passed and it is required in the 'require_admin_context' decorator:

Example:

https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L4740

It's not even being used. Same for 'task_log_get' method.

Revision history for this message
Boris Pavlovic (boris-42) wrote :

Thanks, would you like make patch?

Revision history for this message
Tiago Mello (timello) wrote :

Hey Boris. Yes, already working on it.

Revision history for this message
Boris Pavlovic (boris-42) wrote :

So as I understand you should:
1) call _task_log_get_query with context parameter
2) and remove session parameter from API.

One more time thanks.
Hmm.. I don't understand how tests have passed...

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

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

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

Reviewed: https://review.openstack.org/20179
Committed: http://github.com/openstack/nova/commit/6859f5e843a3a0cbee644661ca8b9cb1c88894a0
Submitter: Jenkins
Branch: master

commit 6859f5e843a3a0cbee644661ca8b9cb1c88894a0
Author: Tiago Mello <email address hidden>
Date: Mon Jan 21 20:01:40 2013 -0200

    Fixes task_log_get and task_log_get_all signatures

    Fixes signatures for the above methods in nova/db/api.py
    based on the recent TaskLog refactor on sqlalchemy/api.py.
    Also adds unit tests for TaskLog.

    Fixes Bug 1102652.

    Change-Id: Id7ce74b8941d9eb6a50dfbfaa62e0fe05dd467c2

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Boris Pavlovic (boris-42) wrote :

Good job.

Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.