[DHCP] Improve the DHCP agent log

Bug #2073490 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

All DHCP agent updates (RPC events and calls) are stored in ``DhcpAgent._queue``, that is a ``queue.ResourceProcessingQueue`` instance. In order to measure the load of the DHCP agent, it could be useful to log the number of remaining events when each one is processed. That will provide a rough number of the load of the DHCP agent.

The event method call are logged using the decorator ``@log_helpers.log_method_call``. However when a port is created, the port information is stored in a ``dhcp.DictModel`` instance, that is not correctly printed in the log messages.

Changed in neutron:
importance: Undecided → Medium
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
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/+/924392

Changed in neutron:
status: New → 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/+/924392
Committed: https://opendev.org/openstack/neutron/commit/88e83dc7f042533bc5b587307a2a2f6b0311b5da
Submitter: "Zuul (22348)"
Branch: master

commit 88e83dc7f042533bc5b587307a2a2f6b0311b5da
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Jul 18 09:47:01 2024 +0000

    [DHCP] Inform about the number of pending events to be processed

    After the execution of an RPC event received, the DHCP agent will log
    the number of pending events stored in ``DhcpAgent._queue``, that is a
    ``ResourceProcessingQueue`` instance.

    This patch also improves the ``DictModel`` class. When an instance of
    this class is printed in a log message, the ``__repr__`` method will
    call the ``__str__`` method, that returns the key/values stored in the
    local dictionary.

    Closes-Bug: #2073490
    Change-Id: I69dc6235f7599b687e49428aaa02c4b70154f393

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

This issue was fixed in the openstack/neutron 25.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.