PTP alarms not raised in CentOS-based StarlingX

Bug #1979645 reported by Douglas Henrique Koerich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Douglas Henrique Koerich

Bug Description

Brief Description
-----------------
PTP plugin is not properly configured for monitoring because the OS evaluation is not working properly for CentOS.

Severity
--------
Major

Steps to Reproduce
------------------
In a CentOS-based StarlingX environment, setup PTP slave configuration but without GM.

Expected Behavior
------------------
The "PTP not locked" should be visible.

Actual Behavior
----------------
No alarm is raised.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Only CentOS-based systems with PTP configuration.

Branch/Pull Time/Commit
-----------------------
r/stx7.0

Last Pass
---------
r/stx6.0

Timestamp/Logs
--------------
2022-06-22T19:07:55.036 controller-0 collectd[97024]: info ptp plugin unsupported OS type '"centos"'
2022-06-22T19:07:55.040 controller-0 collectd[97024]: info ptp plugin configuration completed
2022-06-22T19:07:55.041 controller-0 collectd[97024]: info ptp plugin Timestamping Mode: hardware
2022-06-22T19:07:55.041 controller-0 collectd[97024]: info ptp plugin instance configuration directory not found
2022-06-22T19:07:55.041 controller-0 collectd[97024]: info ptp plugin instance:host_based type:ptp4l found
2022-06-22T19:07:55.257 controller-0 collectd[97024]: info ptp plugin controller-0 initialization completed

Test Activity
-------------
Regression Testing

Workaround
----------
N/A

Changed in starlingx:
assignee: nobody → Douglas Henrique Koerich (dkoerich-wr)
status: New → In Progress
summary: - PTP alarming stopped to work in StarlingX w/ CentOS
+ PTP alarms not raised in CentOS-based StarlingX
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to monitoring (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/monitoring/+/847350

Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.networking
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to monitoring (master)

Reviewed: https://review.opendev.org/c/starlingx/monitoring/+/847350
Committed: https://opendev.org/starlingx/monitoring/commit/32c26e5f48dbbe4605f90133f2141909eae94b15
Submitter: "Zuul (22348)"
Branch: master

commit 32c26e5f48dbbe4605f90133f2141909eae94b15
Author: Douglas Henrique Koerich <email address hidden>
Date: Thu Jun 23 10:40:32 2022 -0300

    PTP plugin: fix OS identification for CentOS

    The change https://review.opendev.org/c/starlingx/monitoring/+/846042
    introduced a logic to set the PTP configuration files used by monitoring
    to the correct path depending on the base OS of StarlingX, and such
    identification is taken from /etc/os-release. However, it wasn't noticed
    that ID is quoted in CentOS while not in Debian. Without considering the
    quotes, "centos" has been considered an unsupported OS type for PTP
    plugin. This change fixes by considering the quotes in the ID.

    Test Plan:
    PASS: Checked logs of collectd for proper PTP plugin configuration in
          CentOS-based system; also provoked alarm condition and saw it has
          been raised.

    Closes-Bug: 1979645
    Signed-off-by: Douglas Henrique Koerich <email address hidden>
    Change-Id: I584abaada39ff9e5cd54e74f836e55a28e75566e

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Douglas Henrique Koerich (dkoerich-wr) wrote :

Reopening: the wrong patchset has been merged.

Changed in starlingx:
status: Fix Released → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to monitoring (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/monitoring/+/847394

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

Reviewed: https://review.opendev.org/c/starlingx/monitoring/+/847394
Committed: https://opendev.org/starlingx/monitoring/commit/4978eebf45cdfd7ff02ee9ad98430a96075c1e8e
Submitter: "Zuul (22348)"
Branch: master

commit 4978eebf45cdfd7ff02ee9ad98430a96075c1e8e
Author: Douglas Henrique Koerich <email address hidden>
Date: Thu Jun 23 15:15:09 2022 -0300

    Fix OS identification for CentOS (continued)

    The previous change
    (https://review.opendev.org/c/starlingx/monitoring/+/847350) missed a
    minor correction in the code. The correction was included in the tests
    but was not uploaded as new patchset (missing #3) before submitting for
    review.

    Closes-Bug: 1979645
    Signed-off-by: Douglas Henrique Koerich <email address hidden>
    Change-Id: I7ecfa11ecb7846d331905ff3e1cf10900efbba00

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
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.