diff --git a/CHANGELOG.md b/CHANGELOG.md index 42f8ed2e32..7e58e3e338 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ## [unreleased] ### Added - [#6448](https://github.com/apache/trafficcontrol/issues/6448) Added `status` and `lastPoll` fields to the `publish/CrStates` endpoint of Traffic Monitor (TM). +- Added back to the health-client the `status` field logging with the addition of the filed to `publish/CrStates` - Added a new Traffic Ops endpoint to `GET` capacity and telemetry data for CDNi integration. - Added a Traffic Ops endpoints to `PUT` a requested configuration change for a full configuration or per host and an endpoint to approve or deny the request. - Traffic Monitor config option `distributed_polling` which enables the ability for Traffic Monitor to poll a subset of the CDN and divide into "local peer groups" and "distributed peer groups". Traffic Monitors in the same group are local peers, while Traffic Monitors in other groups are distibuted peers. Each TM group polls the same set of cachegroups and gets availability data for the other cachegroups from other TM groups. This allows each TM to be responsible for polling a subset of the CDN while still having a full view of CDN availability. In order to use this, `stat_polling` must be disabled. diff --git a/tc-health-client/tmagent/tmagent.go b/tc-health-client/tmagent/tmagent.go index 10206efe3d..bb4ebe08c8 100644 --- a/tc-health-client/tmagent/tmagent.go +++ b/tc-health-client/tmagent/tmagent.go @@ -353,11 +353,7 @@ func (c *ParentInfo) PollAndUpdateCacheStatus() { if !c.Cfg.EnableActiveMarkdowns && !tmAvailable { log.Infof("TM reports that %s is not available and should be marked DOWN but, mark downs are disabled by configuration", hostName) } else { - // See issue #6448, the status field used in api/cache-status is not - // available in the publish/CrStates endpoint. For now, will not - // use it. - //if err = c.markParent(cs.Fqdn, *v.Status, tmAvailable); err != nil { - if err = c.markParent(cs.Fqdn, tmAvailable); err != nil { + if err = c.markParent(cs.Fqdn, v.Status, tmAvailable); err != nil { log.Errorln(err.Error()) } } @@ -523,10 +519,7 @@ func (c *ParentInfo) execTrafficCtl(fqdn string, available bool) error { // used to mark a parent as up or down in the trafficserver HostStatus // subsystem. -// -// TODO see issue #6448, add cacheStatus back when available in CrStates -//func (c *ParentInfo) markParent(fqdn string, cacheStatus string, available bool) error { -func (c *ParentInfo) markParent(fqdn string, available bool) error { +func (c *ParentInfo) markParent(fqdn string, cacheStatus string, available bool) error { var hostAvailable bool var err error hostName := parseFqdn(fqdn) @@ -553,10 +546,8 @@ func (c *ParentInfo) markParent(fqdn string, available bool) error { log.Errorln(err.Error()) } if err == nil { - // TODO see issue 6448, add cacheStatus back when available in CrStates - // log.Infof("marked parent %s DOWN, cache status was: %s\n", hostName, cacheStatus) hostAvailable = false - log.Infof("marked parent %s DOWN", hostName) + log.Infof("marked parent %s DOWN, cache status was: %s\n", hostName, cacheStatus) } } } else { // available @@ -566,9 +557,7 @@ func (c *ParentInfo) markParent(fqdn string, available bool) error { hostAvailable = true // reset the unavilable poll count unavailablePollCount = 0 - // TODO see issue #6448, add cacheStatus back when available in CrStates - //log.Infof("marked parent %s UP, cache status was: %s\n", hostName, cacheStatus) - log.Infof("marked parent %s UP", hostName) + log.Infof("marked parent %s UP, cache status was: %s\n", hostName, cacheStatus) } else { hostAvailable = false }