diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fb8d0d0fd..b06786ec1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#7063](https://github.com/apache/trafficcontrol/pull/7063) *Traffic Ops* Python client now uses Traffic Ops API 4.1 by default. - [#6981](https://github.com/apache/trafficcontrol/pull/6981) *Traffic Portal* Obscures sensitive text in Delivery Service "Raw Remap" fields, private SSL keys, "Header Rewrite" rules, and ILO interface passwords by default. - [#7037](https://github.com/apache/trafficcontrol/pull/7037) *Traffic Router* Uses Traffic Ops API 4.0 by default +- [#7191](https://github.com/apache/trafficcontrol/issues/7191) *tc-health-client* Uses Traffic Ops API 4.0. Also added reload option to systemd service file ### Fixed - [#7179](https://github.com/apache/trafficcontrol/issues/7179) *Traffic Portal* Fixed search filter for Delivery Service Table diff --git a/tc-health-client/README.md b/tc-health-client/README.md index 8801dae8c0..54b77e78f3 100644 --- a/tc-health-client/README.md +++ b/tc-health-client/README.md @@ -56,9 +56,10 @@ otherwise unavailable, the tc-health-client will utilize the **Traffic Server** and **Traffic Monitor** has determined that the marked down host is now available, the client will then utilize the **Traffic Server** tool to mark the host back up. -Also on each polling cycle the configuration file, **tc-health-client.json** is -checked and a new config is reloaded if the file has changed since the last -polling cycle. The **Traffic Monitors** list is refreshed from **Traffic Ops**. +Any changes to **tc-health-client.json** will require sending a SIGHUP to the running +process. This will cause the tc-health-client to read the config file and load any +changes, the **Traffic Monitors** list will be refreshed from **Traffic Ops**. +**systemctl reload tc-health-client** can also be used to send a SIGHUP. If errors are encountered while polling a Traffic Monitor, the error is logged and the **Traffic Monitors** list is refreshed from **Traffic Ops**. diff --git a/tc-health-client/tc-health-client.service b/tc-health-client/tc-health-client.service index 5202ce9780..9edcd67527 100644 --- a/tc-health-client/tc-health-client.service +++ b/tc-health-client/tc-health-client.service @@ -23,6 +23,7 @@ Requires=trafficserver.service [Service] ExecStart=/usr/bin/tc-health-client -vv +ExecReload=/bin/kill -HUP $MAINPID Restart=always RestartSec=5 PIDFile=/run/tc-health-client.pid diff --git a/tc-health-client/tmagent/tmagent.go b/tc-health-client/tmagent/tmagent.go index ea282a64f7..54243b4d35 100644 --- a/tc-health-client/tmagent/tmagent.go +++ b/tc-health-client/tmagent/tmagent.go @@ -38,7 +38,7 @@ import ( "github.com/apache/trafficcontrol/lib/go-tc" "github.com/apache/trafficcontrol/tc-health-client/config" "github.com/apache/trafficcontrol/tc-health-client/util" - toclient "github.com/apache/trafficcontrol/traffic_ops/v3-client" + toclient "github.com/apache/trafficcontrol/traffic_ops/v4-client" "gopkg.in/yaml.v2" ) @@ -636,7 +636,7 @@ func (pi *ParentInfo) GetTOData(cfg *config.Cfg) error { } } - srvs, _, err := toData.TOClient.GetServersWithHdr(nil, nil) + srvs, _, err := toData.TOClient.GetServers(toclient.NewRequestOptions()) if err != nil { // next time we'll login again and get a new session. toData.TOClient = nil