OSC error message if fw group is not found is misleading

Bug #2142458 reported by Slawek Kaplonski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Low
Slawek Kaplonski

Bug Description

In the client commands related to the FWaaS resources, if e.g. firewall group is not found in Neutron there is misleading error like:

$ openstack firewall group show 88ed9e42-3a43-4087-aac8-a656ab9c36f9

'NoneType' object is not subscriptable

Instead of proper 404 error message displayed.

Tags: fwaas
tags: added: fwaas
Changed in python-neutronclient:
status: New → Confirmed
Revision history for this message
Lajos Katona (lajos-katona) wrote :

As we discussed in IRC, it is fine as I see to fix this issue in neutronclient now:
https://meetings.opendev.org/irclogs/%23openstack-neutron/%23openstack-neutron.2026-02-23.log.html#openstack-neutron.2026-02-23.log.html#t2026-02-23T10:09:57

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

Reviewed: https://review.opendev.org/c/openstack/python-neutronclient/+/978057
Committed: https://opendev.org/openstack/python-neutronclient/commit/6e5eb4da33f8accf15a1d5680062c0b6b6fa9c3b
Submitter: "Zuul (22348)"
Branch: master

commit 6e5eb4da33f8accf15a1d5680062c0b6b6fa9c3b
Author: Slawek Kaplonski <email address hidden>
Date: Thu Feb 26 11:04:47 2026 +0100

    [fwaas] Don't ignore missing fw related resources

    Previously when fwaas osc plugin was going to look for firewall related
    resources, like e.g. asking neutron for firewall group or policy was
    done with ignore_missing=True which means that openstack SDK client
    didn't raise exception when requested object was not found on the
    server.
    That led to the weird and unclear error message displayed by the
    OpenStack client which said something about "'NoneType' object is not
    subscriptable".

    This patch adds "ignore_missing=True" to all those "find_*" methods used
    in the fwaas osc plugin. That way proper exception is raised by the SDK
    client and valid error message is displayed to the user by OSC.

    Closes-bug: #2142458

    Change-Id: I309a5dbf61c65d5837d4ea2b3235aa41269ae73d
    Signed-off-by: Slawek Kaplonski <email address hidden>

Changed in python-neutronclient:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-neutronclient 12.0.0 Hibiscus 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.