Comment 5 for bug 2004043

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>