Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Add configuration setting for TO client request timeout#7050

Merged
srijeet0406 merged 3 commits intoapache:masterfrom
tcfdev:feature/toclient-timeout-configuration
Oct 13, 2022
Merged

Add configuration setting for TO client request timeout#7050
srijeet0406 merged 3 commits intoapache:masterfrom
tcfdev:feature/toclient-timeout-configuration

Conversation

@tcfdev
Copy link
Copy Markdown
Collaborator

@tcfdev tcfdev commented Aug 30, 2022

Closes: #7048


Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Stats

What is the best way to verify this PR?

Ensure the all tests (especially CDN-in-a-box) continues to work and run. Traffic Stats should run whether the configuration value is present or not. It will default to the previous hard coded 10 seconds. However, now it should also accept the new "toRequestTimeout" value in the .cfg file.

As this requires an unresponsive/slow TO instance, testing can be difficult. This can be done locally with a debug build and breakpoints. You can put a breakpoint at the beginning of the TO GET v3.1/servers endpoint and waiting longer the alloted time (be it the 10 second default or whatever custom value you place) which will prevent Traffic Stats from receiving a response in time and cause the error to appear in the log. The error is:

[ERROR] 2022-08-30 14:36:10 Error getting server list from https://{{traffic_ops_url}}/: Get "https://{{traffic_ops_url}}/api/3.1/servers": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

The next time through you can remove the breakpoint and allow it to proceed normally. The error will not appear and TS will function normally.

If this is a bugfix, which Traffic Control versions contained the bug?

PR submission checklist

  • This PR has tests - Traffic Stats has minimal testing support and would require significant refactoring for this test.
  • This PR has documentation
  • This PR has a CHANGELOG.md entry
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@tcfdev tcfdev marked this pull request as ready for review August 31, 2022 21:13
Comment thread CHANGELOG.md Outdated
Comment thread infrastructure/ansible/roles/traffic_stats/templates/traffic_stats.cfg.j2 Outdated
@tcfdev tcfdev force-pushed the feature/toclient-timeout-configuration branch from f1e5f17 to 13293d0 Compare October 10, 2022 22:24
@srijeet0406 srijeet0406 merged commit 60eb25c into apache:master Oct 13, 2022
@asf-ci asf-ci mentioned this pull request Nov 1, 2022
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Traffic Stats - Add Traffic Ops client timeout configuration

3 participants