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 27f69ec550 Adding ability for ipv4Availability and ipv6Availability to
TM (#7024)
27f69ec550 is described below
commit 27f69ec550b33465e066a3f9354eca5090a41a8b
Author: Srijeet Chatterjee <[email protected]>
AuthorDate: Thu Aug 18 11:39:13 2022 -0600
Adding ability for ipv4Availability and ipv6Availability to TM (#7024)
---
CHANGELOG.md | 1 +
traffic_monitor/health/event.go | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 794ac6d92a..fa81bc42b7 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
- [#6033](https://github.com/apache/trafficcontrol/issues/6033) Added ability
to assign multiple server capabilities to a server.
+- [Traffic Monitor] Added logging for `ipv4Availability` and
`ipv6Availability` in TM.
### Fixed
- Traffic Stats: Reuse InfluxDB client handle to prevent potential connection
leaks
diff --git a/traffic_monitor/health/event.go b/traffic_monitor/health/event.go
index 7aa27bfc49..e6b943a1c2 100644
--- a/traffic_monitor/health/event.go
+++ b/traffic_monitor/health/event.go
@@ -90,8 +90,8 @@ func (o *ThreadsafeEvents) Get() []Event {
// Add adds the given event. This is threadsafe for one writer, multiple
readers. This MUST NOT be called by multiple threads, as it non-atomically
fetches and adds.
func (o *ThreadsafeEvents) Add(e Event) {
- // host="hostname", type=EDGE, available=true, msg="REPORTED -
available"
- log.Eventf(time.Time(e.Time), "host=\"%s\", type=%s, available=%t,
msg=\"%s\"", e.Hostname, e.Type, e.Available, e.Description)
+ // host="hostname", type=EDGE, available=true, ipv4Available=true,
ipv6Available=true, msg="REPORTED - available"
+ log.Eventf(time.Time(e.Time), "host=\"%s\", type=%s, available=%t,
ipv4Available=%t, ipv6Available=%t, msg=\"%s\"", e.Hostname, e.Type,
e.Available, e.IPv4Available, e.IPv6Available, e.Description)
o.m.Lock() // TODO test removing
events := copyEvents(*o.events)
e.Index = *o.nextIndex