Comment 9 for bug 1682693

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

Reviewed: https://review.openstack.org/456872
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c4820305d2f9ee8d62bcc708baf3fa6dfe7ca960
Submitter: Jenkins
Branch: master

commit c4820305d2f9ee8d62bcc708baf3fa6dfe7ca960
Author: Kevin_Zheng <email address hidden>
Date: Fri Apr 14 11:57:59 2017 +0800

    Use deepcopy when process filters in db api

    In db API when we process filters, we didn't
    use deepcopy. In cases of "tags" and "not-tags"
    we used pop to get the first tag, filtered out
    results, and then joined with other tags for
    later filtering. When we did pop(), the original
    value was deleted, the key "tags"/"not-tags" remains.

    In the cell scenario, both single cell(we will
    query cell0 and the other cell) and multicell,
    as we have to query all the cells in a loop and
    the tags list in the filter will keep popping,
    this will lead to either a HTTP 500 error(popping
    from an empty list) or incorrect result(when
    number of tags in the list is larger than cell
    number, no HTTP 500 will show, but the filter
    results for each cell will be different as
    each loop will pop one tag).

    closes-bug: #1682693

    Change-Id: Ia2738dd0c7d1842b68c83d0a9e75e26b2f8d492a