Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 4 additions & 15 deletions tc-health-client/tmagent/tmagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
}
Expand Down