You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2021/09/09 17:46:09 UTC

[trafficcontrol] branch master updated: Fix for tm-health-client systemd service (#6177)

This is an automated email from the ASF dual-hosted git repository.

ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 72a0183  Fix for tm-health-client systemd service (#6177)
72a0183 is described below

commit 72a01836a1a6b4dcd67a5d4b50a697a8e6cbe790
Author: Steve Malenfant <sm...@users.noreply.github.com>
AuthorDate: Thu Sep 9 13:45:57 2021 -0400

    Fix for tm-health-client systemd service (#6177)
    
    * Fix for tm-health-client service
    - Stop and start automatically when trafficserver stop/start
    - stopping service now works (changed the kill switch)
    
    * Removing ExecStop. Systemd takes care of this
    - Adding 5 seconds delay during retries. If configuration is wrong, it fails the loop too quick.
      This might also cause issues when starting and can't reach Traffic Server
    
    Co-authored-by: Steve Malenfant <st...@cox.com>
---
 cache-config/tm-health-client/tm-health-client.service | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/cache-config/tm-health-client/tm-health-client.service b/cache-config/tm-health-client/tm-health-client.service
index 46ba64b..6c2c3c9 100644
--- a/cache-config/tm-health-client/tm-health-client.service
+++ b/cache-config/tm-health-client/tm-health-client.service
@@ -18,13 +18,14 @@
 #
 [Unit]
 Description=Traffic monitor health service for Trafficserver
-After=trafficserver
+After=trafficserver.service
+Requires=trafficserver.service
 
 [Service]
 ExecStart=/usr/bin/tm-health-client -vv
-RequiredBy=trafficserver
 Restart=always
-ExecStop=/bin/kill -s $MAINPID
+RestartSec=5
 
 [Install]
-
+RequiredBy=trafficserver.service
+WantedBy=trafficserver.service