Cristian Mondo 99c893e966 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 <cristian.mondo@windriver.com>
2023-04-21 13:30:14 -03:00
2019-09-09 14:37:23 -05:00
2022-12-27 01:20:28 +00:00
2021-07-15 12:02:38 -03:00
2021-07-15 12:02:38 -03:00
2019-09-09 14:37:23 -05:00
2019-09-09 14:37:23 -05:00
2019-09-09 14:37:23 -05:00
2022-12-27 01:20:28 +00:00
Description
StarlingX system monitoring and repoting tools
3.3 MiB
Languages
Python 83.4%
Perl 15.8%
Makefile 0.6%
Shell 0.2%