Logging service writing errors in the logs when RPC required

Bug #1960533 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Mamatisa Nurmatov

Bug Description

The log API service, when RPC is required, always writes errors in the logs. Example:
/var/log/containers/neutron/server.log.1:77743:2022-02-09 15:00:07.436 17 ERROR neutron.services.logapi.drivers.manager [req-8bd18cf3-2ac3-46f0-a718-8a67be4a2331 3a57a60f73c44b82afbe0384a9fd52fa 3270928a80dc444fb5b471d2927544e9 - default default] Method create_log_precommit is not implemented in logging RPC

This is because the default RPC server implementation, "LoggingApiNotification" [1], does not implement all the methods implemented by the "DriverBase" [2]. When a method of the driver is called, if the RPC is required, the same method will be called in the RPC server.

This is a cosmetic change, the service works. But having by design an error in the log messages is not a good implementation.

[1]https://github.com/openstack/neutron/blob/cf0cc1f4f262994db1044431fc9142745f2a757b/neutron/services/logapi/rpc/server.py#L102
[2]https://github.com/openstack/neutron/blob/cf0cc1f4f262994db1044431fc9142745f2a757b/neutron/services/logapi/drivers/base.py#L27

Changed in neutron:
importance: Undecided → Low
Changed in neutron:
status: New → Confirmed
tags: added: low-hanging-fruit
summary: - Logging service writting errors in the logs when RPC required
+ Logging service writing errors in the logs when RPC required
tags: added: logging
Changed in neutron:
assignee: nobody → Mamatisa Nurmatov (isabek)
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/+/829522

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/+/829522
Committed: https://opendev.org/openstack/neutron/commit/1aeef5a74e82e97cbed7d65a1f824dbb3070af08
Submitter: "Zuul (22348)"
Branch: master

commit 1aeef5a74e82e97cbed7d65a1f824dbb3070af08
Author: Nurmatov Mamatisa <email address hidden>
Date: Wed Feb 16 14:07:02 2022 +0300

    Add new class for Logging API methods

    Not all logapi "DriverBase" [1] methods are implemented in
    rpc "LoggingApiNotification" [2]
    Now above classes inherit from class 'LoggingApiBase'

    [1] https://github.com/openstack/neutron/blob/cf0cc1f4f262994db1044431fc9142745f2a757b/neutron/services/logapi/drivers/base.py#L27
    [2]
    https://github.com/openstack/neutron/blob/cf0cc1f4f262994db1044431fc9142745f2a757b/neutron/services/logapi/rpc/server.py#L102

    Closes-bug: #1960533
    Change-Id: I9fbfa0f823bcdde60910b018ef2a8fdffaf3512c

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

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