From 00520ac78c52f58881119a05c7d61cdb8dd79f0f Mon Sep 17 00:00:00 2001 From: Alex Kozyrev Date: Thu, 9 Aug 2018 14:11:41 -0400 Subject: [PATCH] Moving PMON script for NTP from MTCE to Puppet Introduction of PTP service requires NTP service to be disabled. Process monitoring of NTP daemon must be turned off as well. There is no way to start/stop process monitoring from MTCE. Puppet can check NTP status at startup and enable/disable monitoring. So, it is needed to move NTP-related PMON script from MTCE to Puppet. This is first step: removing NTP references from MTCE. Change-Id: I1ca6045af8c5169220b7332d45b843fdb4960f01 Story: 2002935 Task: 24520 Signed-off-by: Alex Kozyrev --- mtce-common/centos/build_srpm.data | 2 +- mtce-common/centos/cgts-mtce-common.spec | 2 -- .../pmon/scripts/ntpd.conf | 19 ------------------- .../pmon/scripts/pmon-test.sh | 2 ++ .../pmon/scripts/pmon.service | 3 ++- 5 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 mtce-common/cgts-mtce-common-1.0/pmon/scripts/ntpd.conf diff --git a/mtce-common/centos/build_srpm.data b/mtce-common/centos/build_srpm.data index 0b22bf3f..728c2f30 100644 --- a/mtce-common/centos/build_srpm.data +++ b/mtce-common/centos/build_srpm.data @@ -1,3 +1,3 @@ SRC_DIR="cgts-mtce-common-1.0" -TIS_PATCH_VER=134 +TIS_PATCH_VER=135 BUILD_IS_SLOW=5 diff --git a/mtce-common/centos/cgts-mtce-common.spec b/mtce-common/centos/cgts-mtce-common.spec index 429cfa79..a9310d36 100644 --- a/mtce-common/centos/cgts-mtce-common.spec +++ b/mtce-common/centos/cgts-mtce-common.spec @@ -478,7 +478,6 @@ install -m 644 -p -D %{_buildsubdir}/scripts/mtcClient.conf %{buildroot}%{local_ install -m 644 -p -D %{_buildsubdir}/scripts/hbsClient.conf %{buildroot}%{local_etc_pmond}/hbsClient.conf install -m 644 -p -D %{_buildsubdir}/pmon/scripts/acpid.conf %{buildroot}%{local_etc_pmond}/acpid.conf install -m 644 -p -D %{_buildsubdir}/pmon/scripts/sshd.conf %{buildroot}%{local_etc_pmond}/sshd.conf -install -m 644 -p -D %{_buildsubdir}/pmon/scripts/ntpd.conf %{buildroot}%{local_etc_pmond}/ntpd.conf install -m 644 -p -D %{_buildsubdir}/pmon/scripts/syslog-ng.conf %{buildroot}%{local_etc_pmond}/syslog-ng.conf install -m 644 -p -D %{_buildsubdir}/pmon/scripts/nslcd.conf %{buildroot}%{local_etc_pmond}/nslcd.conf install -m 644 -p -D %{_buildsubdir}/rmon/scripts/rmon.conf %{buildroot}%{local_etc_pmond}/rmon.conf @@ -574,7 +573,6 @@ install -m 755 -d %{buildroot}/var/run # Maintenance Process Monitor Config Files %{local_etc_pmond}/sshd.conf -%{local_etc_pmond}/ntpd.conf %{local_etc_pmond}/mtcClient.conf %{local_etc_pmond}/acpid.conf %{local_etc_pmond}/hbsClient.conf diff --git a/mtce-common/cgts-mtce-common-1.0/pmon/scripts/ntpd.conf b/mtce-common/cgts-mtce-common-1.0/pmon/scripts/ntpd.conf deleted file mode 100644 index 524573b7..00000000 --- a/mtce-common/cgts-mtce-common-1.0/pmon/scripts/ntpd.conf +++ /dev/null @@ -1,19 +0,0 @@ -[process] -process = ntpd -service = ntpd -pidfile = /var/run/ntp.pid -style = lsb ; ocf or lsb -severity = minor ; minor, major, critical -restarts = 0 ; restart retries before error assertion -interval = 10 ; number of seconds to wait between restarts -debounce = 10 ; number of seconds that a process needs to remain - ; running before degrade is removed and retry count - ; is cleared. -; These settings will generate a log only without attempting to restart -; pmond will put the process into an ignore state after failure. - -startuptime = 180 ; Seconds to wait after process start before starting the debounce monitor -mode = passive ; Monitoring mode: passive (default) or active - ; passive: process death monitoring (default: always) - ; active : heartbeat monitoring, i.e. request / response messaging - ; ignore : do not monitor or stop monitoring diff --git a/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon-test.sh b/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon-test.sh index 1b86a6b5..fee780fe 100755 --- a/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon-test.sh +++ b/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon-test.sh @@ -38,6 +38,8 @@ # neutron-sriov-nic-agent restart PASSED [11092]:[30551] # nova-compute restart PASSED [14776]:[1109] # ntpd does not support restart +# ptp4l does not support restart +# phc2sys does not support restart # rmond restart PASSED [13893]:[5129] # sm-api restart PASSED [8896]:[8460] # skipping 'sm' process diff --git a/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon.service b/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon.service index 8cad6359..298ded89 100644 --- a/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon.service +++ b/mtce-common/cgts-mtce-common-1.0/pmon/scripts/pmon.service @@ -3,7 +3,8 @@ Description=Titanium Cloud Maintenance Process Monitor After=config.service # The following thirdparty service files are not modified by Titanium Cloud, # so add "After" clauses here rather than "Before=pmon.service" to those -After=sshd.service ntpd.service acpid.service syslog-ng.service +After=sshd.service acpid.service syslog-ng.service +After=ntpd.service ptp4l.service phc2sys.service Before=hostw.service [Service]