Comment 1 for bug 1933525

Revision history for this message
Drew Freiberger (afreiberger) wrote :

This was found on a focal deployment with cs:ntp deployed as a subordinate to the metal charm, and ceph-fs deployed on an lxd on top of that metal. It's random as to which of the processes, ntpd in the container, or chronyd on the metal, comes up in the proc table first.

For a very simple fix, since we typically would not run cs:ntp inside a container, you could ignore containerized ntpd processes by requiring PPID of the process to be 1 as well as matching the process name to the list of options.

Suggest changing process.py line 180 from:
                if name in self.names:
to:
                ppid = proc.ppid() if self.PSUTIL2 else proc.ppid
                if ppid == 1 and name in self.names:

Ultimately, checking the package(s) installed in the current system is much more valuable to determine which self.names should be used.