Attribute error in neutron-ovs-agent

Bug #1999391 reported by Slawek Kaplonski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Lajos Katona

Bug Description

I noticed in the Openvswitch agent logs in the CI jobs stacktraces like:

Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc [None req-024660c2-8e49-4135-8322-2ea29fac319e None None] Failed to get details for device d9cdde27-90fa-425f-a42c-f8464806457f: AttributeError: 'NoneType' object has no attribute 'qos_policy_id'
Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc Traceback (most recent call last):
Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc File "/opt/stack/neutron/neutron/agent/rpc.py", line 321, in get_devices_details_list_and_failed_devices
Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc self.get_device_details(context, device, agent_id, host,
Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc File "/opt/stack/neutron/neutron/agent/rpc.py", line 355, in get_device_details
Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc qos_network_policy_id = net.qos_policy_id
Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc AttributeError: 'NoneType' object has no attribute 'qos_policy_id'
Dec 12 09:44:51.014564 nested-virt-ubuntu-jammy-ovh-bhs1-0032473968 neutron-openvswitch-agent[57685]: ERROR neutron.agent.rpc

Example of such error: https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_d8f/860270/8/check/neutron-tempest-plugin-openvswitch/d8f61ec/controller/logs/screen-q-agt.txt

It don't cause job failure but should be handled in better way in the code to avoid ugly stacktraces.

Changed in neutron:
assignee: nobody → Lajos Katona (lajos-katona)
Revision history for this message
Lajos Katona (lajos-katona) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/869678

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/869678
Committed: https://opendev.org/openstack/neutron/commit/2495ad285614d3a77d3387a0913e1d82f4f8f61b
Submitter: "Zuul (22348)"
Branch: master

commit 2495ad285614d3a77d3387a0913e1d82f4f8f61b
Author: elajkat <email address hidden>
Date: Tue Jan 10 11:54:57 2023 +0100

    Avoid failure of get_device_details if net from cache is empty

    CacheBackedPluginApi.get_device_details tries to fetch net info
    from remote_resource_cache to fill the qos_policy_id for the
    device.
    Fix the case when the cache has no entry for the network.

    Change-Id: I1612dc4515ec0f02fbaf05d60b753485885d8c84
    Closes-bug: #1999391

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 22.0.0.0rc1

This issue was fixed in the openstack/neutron 22.0.0.0rc1 release candidate.

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.