Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TO: cdns/capacity incorrect format on log messages when TM errors #5311

Closed
shamrickus opened this issue Nov 19, 2020 · 1 comment · Fixed by #5347
Closed

TO: cdns/capacity incorrect format on log messages when TM errors #5311

shamrickus opened this issue Nov 19, 2020 · 1 comment · Fixed by #5347
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops

Comments

@shamrickus
Copy link
Member

I'm submitting a ...

  • bug report

Traffic Control components affected ...

  • Traffic Ops

Current behavior:

Currently, TO will query {tmHost}/publish/CacheStatsNew (added in 5.0) and then {tmHost}/publish/CacheStats if that fails.

Both of these log errors that are formatted bad:
getCapacity failed to get CacheStatsNew from cdn '{cdn}' monitor '{monitor}', trying CacheStats{err}
Where err is getting cache stats for CDN '{cdn}' monitor '{monitor}': {tmError}
resulting in:
getCapacity failed to get CacheStatsNew from cdn '{cdn}' monitor '{monitor}', trying CacheStatsgetting cache stats for CDN '{cdn}' monitor '{monitor}': {tmError}

CacheStats has roughly the same issues with some wording changed.

Expected behavior:

Actually output something readable

Minimal reproduction of the problem with instructions:

Run TO 5.0+ with a TM <=4.1 and call {to}/api/v3/cdns/capacity
Or, make TM unreachable from TO right before calling {to}/api/v3/cdns/capacity

@shamrickus shamrickus added the bug something isn't working as intended label Nov 19, 2020
@ocket8888 ocket8888 added low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops labels Nov 19, 2020
@rawlinp
Copy link
Contributor

rawlinp commented Nov 19, 2020

Additionally, it would be helpful for TO to also include the HttpProxy value in the error message (if one is being used) and the full request URL that failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants