zrhoffman commented on code in PR #7192:
URL: https://github.com/apache/trafficcontrol/pull/7192#discussion_r1021969022
##########
tc-health-client/tmagent/tmagent.go:
##########
@@ -656,7 +656,9 @@ func (pi *ParentInfo) GetTOData(cfg *config.Cfg) error {
if *sv.CDNName != cfg.CDNName {
continue
}
- if sv.Type == tc.MonitorTypeName && tc.CacheStatus(*sv.Status)
== tc.CacheStatusOnline {
+ // added OR because MonitorTypeName has been updated to
'TRAFFIC_MONITOR' and TO still has then listed as 'RASCAL'
+ // this will allow it to work either way and can be removed
once TO is updated.
+ if (sv.Type == tc.MonitorTypeName || sv.Type == "RASCAL") &&
tc.CacheStatus(*sv.Status) == tc.CacheStatusOnline {
Review Comment:
The `sv.Type` comparison should be against a shared constant like
`tc.MonitorTypeName` rather than the string literal `"RASCAL"`.
https://github.com/apache/trafficcontrol/blob/1c26082ebff759f4311845caee0d5cc1e0a4baa4/lib/go-tc/enum.go#L134-L136
- It's unfortunate that `tc.MonitorTypeName`'s documentation appears to
discourages its use. It was added in #6040, and if I had noticed it at the
time, I would have suggested rewording it before merging #6040. I think what
it's trying to say is that its value could potentially be updated to something
else in a future PR, but @ocket8888 can tell us for sure what he was trying to
say.
- `tc.MonitorTypeName` changed from `"RASCAL"` to `"TRAFFIC_MONITIOR"` in
#7068
##########
CHANGELOG.md:
##########
@@ -23,6 +23,8 @@ The format is based on [Keep a
Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7176](https://github.com/apache/trafficcontrol/pull/7176) *ATC Build
system* Support building ATC for the `aarch64` CPU architecture
### Changed
+- [#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
+- [#2564](https://github.com/apache/trafficcontrol/issues/2564) Renamed RASCAL
references to TRAFFIC_MONITOR
Review Comment:
Why does #7192 add a changelog entry for #7068?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]