zrhoffman commented on issue #4946:
URL: https://github.com/apache/trafficcontrol/issues/4946#issuecomment-680176423
> Is there some format besides the response format of the
`/cdns/{{CDN}}/snapshot` and `/cdns/{{CDN}}/configs/monitoring` endpoints?
Because that's what I tried when I couldn't get it to work. It's possible that
I just made an imperfect copy or something, of course.
Looks like the actual contents of `tmconfig.backup` are not directly from
`cdns/{{CDN}}/configs/monitoring`. TM calls
`client.GetTrafficMonitorConfigMap()`, which [makes a map out of the
response]https://github.com/apache/trafficcontrol/blob/55b3b03451/traffic_ops/v2-client/traffic_monitor.go#L42)
before sending it back to Traffic Monitor.
I'm not sure why we're manipulating responses within the TO client itself,
but we've done that since [our initial
commit](https://github.com/apache/trafficcontrol/blob/55ff2567d1/traffic_ops/client/traffic_monitor_config.go#L69),
so it isn't anything new.
Do we want to change this so TM writes the raw response to the file and
converts it to a map when trying to use it? Since TM already does this every
time it gets `/cdns/{{CDN}}/configs/monitoring`, doing it for backup files too
would make sense to me. The only thing that backup files are supposed to
compensate is lost connectivity to TO, so the backup files should be TO's raw
responses.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]