Debian: ntp is not being monitored by pmon

Bug #1996247 reported by Luis Eduardo Angelini Marquitti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Luis Eduardo Angelini Marquitti

Bug Description

Brief Description
-----------------
The ntpd process is monitored by the maintenance process monitor (pmond) but has no recovery method.
Looks like the service file changed from ntpd.service in CentOS to ntp.service in Debian.
This needs to be correct in a way that handles both CentOS and Debian.

[sysadmin@controller-1 ~(keystone_admin)]$ sudo systemctl status ntp
● ntp.service - Network Time Service
     Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2022-07-29 19:34:06 UTC; 22h ago
       Docs: man:ntpd(8)
   Main PID: 67281 (ntpd)
      Tasks: 2 (limit: 151609)
     Memory: 952.0K
        CPU: 4.214s
     CGroup: /system.slice/ntp.service
             └─67281 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 112:118

[sysadmin@controller-1 ~(keystone_admin)]$ sudo systemctl status ntpd
Unit ntpd.service could not be found.

[sysadmin@controller-1 ~(keystone_admin)]$ sudo head -2 /etc/pmon.d/ntp.conf
[process]
process = ntpd

Severity
--------
Minor: The ntpd process failure will not be recovered and will lead to a stuck alarm.

Steps to Reproduce
------------------
kill ntpd process ; "sudo pkill -int ntpd"

Expected Behavior
------------------
Process recovery and cleared alarm.

Actual Behavior
----------------
No process recovery and stuck alarm.

Reproducibility
---------------
100%

System Configuration
--------------------
Any

Branch/Pull Time/Commit
-----------------------
Any Debian load

Last Pass
---------
In CentOS where there is a recovery method and works fine.

Timestamp/Logs
--------------
2022-07-30T17:23:37.989 [85107.05698] controller-1 pmond mon pmonHdlr.cpp ( 641) process_config_load : Warn : ntpd has no recovery method found ; process not monitored

Alarms

None. Process is not monitored.

Test Activity
-------------
Unit Testing

Workaround
----------
None

Changed in starlingx:
assignee: nobody → Luis Eduardo Angelini Marquitti (leduard1)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-puppet (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/stx-puppet/+/864244

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

Reviewed: https://review.opendev.org/c/starlingx/stx-puppet/+/864244
Committed: https://opendev.org/starlingx/stx-puppet/commit/09469b88ecd6a1a3590d2f0561f095d08b184fa0
Submitter: "Zuul (22348)"
Branch: master

commit 09469b88ecd6a1a3590d2f0561f095d08b184fa0
Author: Luis Marquitti <email address hidden>
Date: Fri Nov 11 00:18:25 2022 -0300

    Fixing pmon not monitoring ntp in Debian

    NPT service file has changed from ntpd.service in Centos to ntp.service
    in Debian.
    Also, the pidfile changed from ntp.pid to ntpd.pid, as in Debian this is
    specified by ntp-systemd-wrapper.
    To not influence Centos side, a new pmon conf file was created to handle
    it on the Debian side.

    Test Plan:

    PASS: SX and DX fresh install with no alarms;
    PASS: Alarm correctly raised by pmon after kill ntp process;
    PASS: Alarm cleared after restart ntp process;
    PASS: Added servers to NTP using 'system ntp-modify' in SX and DX

    Closes-Bug: 1996247
    Signed-off-by: Luis Marquitti <email address hidden>
    Change-Id: Iebbff350b63f611030f2b78309ceee1d02cf18c9

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.8.0 stx.config
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.