From e74d087b81d761caf3063a815284e11e9f12872c Mon Sep 17 00:00:00 2001 From: Alex Kozyrev Date: Sat, 13 Apr 2019 09:21:51 -0400 Subject: [PATCH] Disable PHC sanity check in case of software PTP mode. boundary_clock_jbod performs a sanity check to make sure that all of the ports share the same hardware clock device. This option is not needed in case of software PTP mode. Moreover it interferes with normal PTP operation in this case and causes PTP clocks instability in a network. Also, cleaning up unused pmon scripts for ptp4l and phc2sys and adding services dependencies from mainline linuxptp. Change-Id: If4bbe6af600dbdf38d301deafb7dc050a7754cad Closes-bug: 1824218 Signed-off-by: Alex Kozyrev --- puppet-manifests/centos/build_srpm.data | 2 +- .../platform/templates/phc2sys.pmon.conf.erb | 19 ------------------- .../platform/templates/phc2sys.service.erb | 1 + .../modules/platform/templates/ptp4l.conf.erb | 6 +++--- .../platform/templates/ptp4l.pmon.conf.erb | 19 ------------------- .../platform/templates/ptp4l.service.erb | 2 ++ 6 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 puppet-manifests/src/modules/platform/templates/phc2sys.pmon.conf.erb delete mode 100644 puppet-manifests/src/modules/platform/templates/ptp4l.pmon.conf.erb diff --git a/puppet-manifests/centos/build_srpm.data b/puppet-manifests/centos/build_srpm.data index dde28e0a0e..9237e7e08d 100644 --- a/puppet-manifests/centos/build_srpm.data +++ b/puppet-manifests/centos/build_srpm.data @@ -1,2 +1,2 @@ SRC_DIR="src" -TIS_PATCH_VER=86 +TIS_PATCH_VER=87 diff --git a/puppet-manifests/src/modules/platform/templates/phc2sys.pmon.conf.erb b/puppet-manifests/src/modules/platform/templates/phc2sys.pmon.conf.erb deleted file mode 100644 index dbab5deb3f..0000000000 --- a/puppet-manifests/src/modules/platform/templates/phc2sys.pmon.conf.erb +++ /dev/null @@ -1,19 +0,0 @@ -[process] -process = phc2sys -service = phc2sys -pidfile = /var/run/phc2sys.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/puppet-manifests/src/modules/platform/templates/phc2sys.service.erb b/puppet-manifests/src/modules/platform/templates/phc2sys.service.erb index 52218e0ba0..a876ad58c3 100644 --- a/puppet-manifests/src/modules/platform/templates/phc2sys.service.erb +++ b/puppet-manifests/src/modules/platform/templates/phc2sys.service.erb @@ -1,5 +1,6 @@ [Unit] Description=Synchronize system clock or PTP hardware clock (PHC) +After=ptp4l.service [Service] Type=simple diff --git a/puppet-manifests/src/modules/platform/templates/ptp4l.conf.erb b/puppet-manifests/src/modules/platform/templates/ptp4l.conf.erb index 486d8f1333..699b32ce46 100644 --- a/puppet-manifests/src/modules/platform/templates/ptp4l.conf.erb +++ b/puppet-manifests/src/modules/platform/templates/ptp4l.conf.erb @@ -82,10 +82,10 @@ delay_filter moving_median delay_filter_length 10 egressLatency 0 ingressLatency 0 -<%- if @slave_only == true -%> -boundary_clock_jbod 0 -<%- else -%> +<%- if @slave_only == false and scope['platform::ptp::mode'].downcase == 'hardware' -%> boundary_clock_jbod 1 +<%- else -%> +boundary_clock_jbod 0 <%- end -%> # # Clock description diff --git a/puppet-manifests/src/modules/platform/templates/ptp4l.pmon.conf.erb b/puppet-manifests/src/modules/platform/templates/ptp4l.pmon.conf.erb deleted file mode 100644 index 230b8e102b..0000000000 --- a/puppet-manifests/src/modules/platform/templates/ptp4l.pmon.conf.erb +++ /dev/null @@ -1,19 +0,0 @@ -[process] -process = ptp4l -service = ptp4l -pidfile = /var/run/ptp4l.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/puppet-manifests/src/modules/platform/templates/ptp4l.service.erb b/puppet-manifests/src/modules/platform/templates/ptp4l.service.erb index 2183a165ca..53384986e3 100644 --- a/puppet-manifests/src/modules/platform/templates/ptp4l.service.erb +++ b/puppet-manifests/src/modules/platform/templates/ptp4l.service.erb @@ -1,5 +1,7 @@ [Unit] Description=Precision Time Protocol (PTP) service +After=network-online.target +Wants=network-online.target [Service] Type=simple