Description Failed to invoke the API interface to obtain the address group list

Bug #2037596 reported by Reason li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Reason li

Bug Description

Call API interface:
    GET /v2.0/address_groups

Exception log:
2023-09-28 09:05:07.951 182 ERROR futurist.periodics File "/var/lib/kolla/venv/lib/python3.6/site-packages/neutron/db/address group db.py", line 174, in get_address_groups
2023-09-28 09:05:07.951 182 ERROR futurist.periodics context, _pager=pager,**filters)
2023-09-28 09:05:07.951 182 ERROR futurist.periodics TypeError: get_objects() argument after ** must be a mapping, not NoyeType
2023-09-28 09:05:07.951 182 ERROR futurist.periodics

View code:
    ...
    def get_address_groups(self, context, filters=None, fields=None,
                           sorts=None, limit=None, marker=None,
                           page_reverse=False):
        pager = base_obj.Pager(sorts, limit, page_reverse, marker)
        address_groups = ag_obj.AddressGroup.get_objects(
            context, _pager=pager, **filters)

solution:
You need to add that you can judge whether the filters are None before using **filters

Add code:
     filters = filters or {}

Reason li (lireason)
Changed in neutron:
assignee: nobody → Reason li (lireason)
Changed in neutron:
status: New → In Progress
Revision history for this message
Lajos Katona (lajos-katona) wrote :
Changed in neutron:
importance: Undecided → High
tags: added: backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/neutron/+/897933

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/neutron/+/897934

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/neutron/+/897936

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/neutron/+/897937

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/897938

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/897939

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/896649
Committed: https://opendev.org/openstack/neutron/commit/7e10a01874b7d2e7f4a28b740a2ebfcd193ae797
Submitter: "Zuul (22348)"
Branch: master

commit 7e10a01874b7d2e7f4a28b740a2ebfcd193ae797
Author: liyou01 <email address hidden>
Date: Wed Sep 27 19:52:31 2023 +0800

    Parameter filters may be None, which cannot be called with **

    Change-Id: I546152312c1dfda69f90154cea5d87392e16a7ae
    Closes-Bug: #2037596

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/897933
Committed: https://opendev.org/openstack/neutron/commit/aaa8f18d11a614086459522940cee3fe268b623d
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit aaa8f18d11a614086459522940cee3fe268b623d
Author: liyou01 <email address hidden>
Date: Wed Sep 27 19:52:31 2023 +0800

    Parameter filters may be None, which cannot be called with **

    Change-Id: I546152312c1dfda69f90154cea5d87392e16a7ae
    Closes-Bug: #2037596
    (cherry picked from commit 7e10a01874b7d2e7f4a28b740a2ebfcd193ae797)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/897934
Committed: https://opendev.org/openstack/neutron/commit/b9a0bf0b01a4206e4412e1cee9178136e92e1a24
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit b9a0bf0b01a4206e4412e1cee9178136e92e1a24
Author: liyou01 <email address hidden>
Date: Wed Sep 27 19:52:31 2023 +0800

    Parameter filters may be None, which cannot be called with **

    Change-Id: I546152312c1dfda69f90154cea5d87392e16a7ae
    Closes-Bug: #2037596
    (cherry picked from commit 7e10a01874b7d2e7f4a28b740a2ebfcd193ae797)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/897936
Committed: https://opendev.org/openstack/neutron/commit/d3001b6f63bfd12dd4118313e6330be0ebfabafd
Submitter: "Zuul (22348)"
Branch: stable/zed

commit d3001b6f63bfd12dd4118313e6330be0ebfabafd
Author: liyou01 <email address hidden>
Date: Wed Sep 27 19:52:31 2023 +0800

    Parameter filters may be None, which cannot be called with **

    Change-Id: I546152312c1dfda69f90154cea5d87392e16a7ae
    Closes-Bug: #2037596
    (cherry picked from commit 7e10a01874b7d2e7f4a28b740a2ebfcd193ae797)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/897937
Committed: https://opendev.org/openstack/neutron/commit/69c4712d8ddbeaf3108b97501a5da34e808e09fd
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 69c4712d8ddbeaf3108b97501a5da34e808e09fd
Author: liyou01 <email address hidden>
Date: Wed Sep 27 19:52:31 2023 +0800

    Parameter filters may be None, which cannot be called with **

    Change-Id: I546152312c1dfda69f90154cea5d87392e16a7ae
    Closes-Bug: #2037596
    (cherry picked from commit 7e10a01874b7d2e7f4a28b740a2ebfcd193ae797)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/897938
Committed: https://opendev.org/openstack/neutron/commit/7bd6497909236114e8929c2bd6bee9a7e51876c7
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 7bd6497909236114e8929c2bd6bee9a7e51876c7
Author: liyou01 <email address hidden>
Date: Wed Sep 27 19:52:31 2023 +0800

    Parameter filters may be None, which cannot be called with **

    Change-Id: I546152312c1dfda69f90154cea5d87392e16a7ae
    Closes-Bug: #2037596
    (cherry picked from commit 7e10a01874b7d2e7f4a28b740a2ebfcd193ae797)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/897939
Committed: https://opendev.org/openstack/neutron/commit/9faa28aa16d287bc58e9e4984ccad9514e6fc737
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 9faa28aa16d287bc58e9e4984ccad9514e6fc737
Author: liyou01 <email address hidden>
Date: Wed Sep 27 19:52:31 2023 +0800

    Parameter filters may be None, which cannot be called with **

    Change-Id: I546152312c1dfda69f90154cea5d87392e16a7ae
    Closes-Bug: #2037596
    (cherry picked from commit 7e10a01874b7d2e7f4a28b740a2ebfcd193ae797)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 22.1.0

This issue was fixed in the openstack/neutron 22.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 23.1.0

This issue was fixed in the openstack/neutron 23.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 20.5.0

This issue was fixed in the openstack/neutron 20.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 21.2.0

This issue was fixed in the openstack/neutron 21.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 24.0.0.0b1

This issue was fixed in the openstack/neutron 24.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron wallaby-eom

This issue was fixed in the openstack/neutron wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron xena-eom

This issue was fixed in the openstack/neutron xena-eom release.

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.