DC Scale | Subclouds with an invalid NTP Address alarm

Bug #2004043 reported by Cristian Mondo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Cristian Mondo

Bug Description

Brief Description
-----------------

The fm is showing IPv6 truncated when an NTP alarm is triggered.

$ fm alarm-list
+----------+-----------------------------------------------------------------------+----------------------------------+----------+----------------------+
| Alarm ID | Reason Text | Entity ID | Severity | Time Stamp |
+----------+-----------------------------------------------------------------------+----------------------------------+----------+----------------------+
| 100.114 | NTP address 2620:10a:a001:a is not a valid or a reachable NTP server. | host=controller-0=2620:10a:a001: | minor | 2022-12-28T12:21:37. |
| | | a | | 987403 |
| | | | | |
+----------+-----------------------------------------------------------------------+----------------------------------+----------+----------------------+
Severity
--------

Minor.

Steps to Reproduce
------------------

Deploy central or a subcloud
Issue $ fm alarm-list

Expected Behavior
------------------

System free of alarms.

Actual Behavior
----------------

A NTP alarm due to a truncated IPv6 address.

Reproducibility
---------------

100%

System Configuration
--------------------

DC and subcloud with NTP peers IPv6

Alarms
----------

100.114 - NTP address 2620:10a:a001:a is not a valid or a reachable

Workaround
----------

N/A

Revision history for this message
Cristian Mondo (cmondo) wrote :

The NTP plugin is based on the output of the "ntpq -np" command. This command returns a table with the information of the peers. However, for the case of IPv6, the remote is shown as truncated. When NTP alarm is triggered, it shows the same with truncated IPv6 as well.
This does not give good information, since IPv6 is printed truncated.
This requires an implementation change to query the remote IP.

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/+/872036

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

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

commit e652193434720e2d4e99d179975c6eb2945cbdc2
Author: Cristian Mondo <email address hidden>
Date: Fri Jan 27 15:16:54 2023 -0300

    Fix to prevent truncating IPv6 value when NTP alarm is triggered.

    When the NTP alarm is triggered indicating that the peer is not
    reachable and if it is IPv6, the IP value is truncated.
    This occurs because the NTP plugin relies on the output of the
    ntpq -np command, which shows the truncated IPv6 as well.
    This causes the IPv6 in the alarm to be truncated, showing its
    partial information.
    To fix this, a mechanism was implemented to invoke the ntpq
    command but specifying the association corresponding to the IPv6
    which is truncated. In this way, detailed information of the
    association is retrieved, including the full IPv6.
    That IPv6 will be the one that will be used as the value for
    the alarm.

    Closes-Bug: 2004043

    Test Plan:

    PASS: Configure NTP with unreachable IPv6 peers to trigger the
    NTP alarm
    PASS: Configure NTP with reachable IPv6 peers to avoid alarms
    PASS: Configure NTP with unreachable IPv4 peers to trigger the
    NTP alarm
    PASS: Configure NTP with reachable IPv4 peers to avoid alarms

    Signed-off-by: Cristian Mondo <email address hidden>
    Change-Id: Id7e0af4f130f04c5eb037e5ff0d0a0cc5ce71b3e

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.8.0 stx.fault stx.monitor
Changed in starlingx:
assignee: nobody → Cristian Mondo (cmondo)
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/+/881246

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

Reviewed: https://review.opendev.org/c/starlingx/monitoring/+/881246
Committed: https://opendev.org/starlingx/monitoring/commit/99c893e966b6f1fd0018107e8aa07efa4a71866d
Submitter: "Zuul (22348)"
Branch: master

commit 99c893e966b6f1fd0018107e8aa07efa4a71866d
Author: Cristian Mondo <email address hidden>
Date: Thu Apr 20 14:45:53 2023 -0300

    Fix to prevent truncating IPv6 value when NTP alarm is triggered.

    This fix is to allow the validation of IPv6 when ntpq command
    output returns a invalid IPv6 format. In some cases the
    truncated IPv6 only ends with single colon, internally the
    a method is invoked to validate the IP family corresponding
    to that format and since it is not a valid format, it fails.
    This behavior causes the returned IP to always be a truncated IP.

    The logic is corrected to validate only when the IP is version 4
    only.

    Test Plan:

    PASS: Configure NTP with unreachable IPv6 peers to trigger the
    NTP alarm
    PASS: Configure NTP with reachable IPv6 peers to avoid alarms
    PASS: Configure NTP with unreachable IPv4 peers to trigger the
    NTP alarm
    PASS: Configure NTP with reachable IPv4 peers to avoid alarms

    Closes-Bug: 2004043

    Review Ref: https://review.opendev.org/c/starlingx/monitoring/+/872036
    Change-Id: I8b5b0080a4714cc864a4bdd0a7e8ad558e18adfa
    Signed-off-by: Cristian Mondo <email address hidden>

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.