Wrong usage of filter in periodic task

Bug #1487812 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Peiyu Lin

Bug Description

In file https://github.com/openstack/magnum/blob/master/magnum/service/periodic.py , under method 'sync_bay_status', it uses filter in this way:

            filters = [bay_status.CREATE_IN_PROGRESS,
                       bay_status.UPDATE_IN_PROGRESS,
                       bay_status.DELETE_IN_PROGRESS]
            bays = objects.Bay.list_all(ctx, filters=filters)

This is wrong, because filter should be a dict (instead of list). See method '_add_bays_filters' in file https://github.com/openstack/magnum/blob/master/magnum/db/sqlalchemy/api.py .

We need to fix it.

hongbin (hongbin034)
tags: added: low-hanging-fruit
Peiyu Lin (mathspanda)
Changed in magnum:
assignee: nobody → Peiyu Lin (mathspanda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

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

Reviewed: https://review.openstack.org/216029
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=a1ffe63454665255943ee27349770f9373a66c2e
Submitter: Jenkins
Branch: master

commit a1ffe63454665255943ee27349770f9373a66c2e
Author: mathspanda <email address hidden>
Date: Sun Aug 23 17:35:08 2015 +0800

    Fix wrong usage of filters in periodic task

    The filters in method 'sync_bay_status' in periodic.py should be a dict,
    instead of a list.

    Change-Id: Id12e8768abb17b70bbc92d951b0d95e765d94e38
    Closes-Bug: #1487812

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
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.