Slave API 404s can fill up log files
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with app/web_framework/cluster_slave_application.py at the get handler and app/common/cluster_service.py at get_console_output, then trace how ItemNotFoundError becomes a 404 and is logged. Confirm the handling for missing console output and the CORS message, and add or update focused tests if the surrounding code provides them; done means repeated 404s no longer flood the slave log.
Written by the indexing model from the issue text.
Description
We've created a dashboard for viewing console output data and if for any reason the console output is not available, the slave log file fills up with tons of errors. CR probably shouldn't log anything on a 404. We could probably also remove the line about the Access-Control-Allow-Origin header.
Example (hundreds of copies of this):
[2017-02-02 12:49:54.280] 19480 WARNING SlaveTornadoThr tornado.access 404 GET /v1/build/141/subjob/590/atom/10/console?max_lines=50 (10.8.189.29) 1.08ms
[2017-02-02 12:49:54.281] 19480 DEBUG SlaveTornadoThr cluster_base_ha Origin "null" did not match cors_allowed_origins_regex conf value of "^http://[^.]*\.((inside-box)|(pod\.box)|(dev\.box))\.net". Not setting Access-Control-Allow-Origin header.
[2017-02-02 12:49:54.282] 19480 ERROR SlaveTornadoThr cluster_base_ha Exception occurred during request to /v1/build/141/subjob/590/atom/12/console?max_lines=50.
Traceback (most recent call last):
File "/home/jenkins/.virtualenvs/clusterrunner/lib/python3.4/site-packages/tornado/web.py", line 1346, in _when_complete
File "/home/jenkins/.virtualenvs/clusterrunner/lib/python3.4/site-packages/tornado/web.py", line 1367, in _execute_method
File "/home/jenkins/ClusterRunnerBuild/app/web_framework/cluster_slave_application.py", line 156, in get
File "/home/jenkins/ClusterRunnerBuild/app/common/cluster_service.py", line 49, in get_console_output
app.util.exceptions.ItemNotFoundError: Output file doesn't exist for build_id: 141 subjob_id: 590 atom_id: 12
[2017-02-02 12:49:54.282] 19480 WARNING SlaveTornadoThr tornado.access 404 GET /v1/build/141/subjob/590/atom/12/console?max_lines=50 (10.8.189.29) 1.10ms
[2017-02-02 12:49:54.283] 19480 DEBUG SlaveTornadoThr cluster_base_ha Origin "null" did not match cors_allowed_origins_regex conf value of "^http://[^.]*\.((inside-box)|(pod\.box)|(dev\.box))\.net". Not setting Access-Control-Allow-Origin header.
[2017-02-02 12:49:54.283] 19480 ERROR SlaveTornadoThr cluster_base_ha Exception occurred during request to /v1/build/141/subjob/590/atom/3/console?max_lines=50.
Traceback (most recent call last):
File "/home/jenkins/.virtualenvs/clusterrunner/lib/python3.4/site-packages/tornado/web.py", line 1346, in _when_complete
File "/home/jenkins/.virtualenvs/clusterrunner/lib/python3.4/site-packages/tornado/web.py", line 1367, in _execute_method
File "/home/jenkins/ClusterRunnerBuild/app/web_framework/cluster_slave_application.py", line 156, in get
File "/home/jenkins/ClusterRunnerBuild/app/common/cluster_service.py", line 49, in get_console_output
app.util.exceptions.ItemNotFoundError: Output file doesn't exist for build_id: 141 subjob_id: 590 atom_id: 3
- Dominant language
- Python
- Stars
- 184
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from box/ClusterRunner
-
bug minor
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
box/ClusterRunner#336 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
box/ClusterRunner#150 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
box/ClusterRunner#457 · 2 comments ·
-
major
Difficulty 5/5 Over a week Newbie friendliness 25/100
box/ClusterRunner#433 · 4 comments · 48 reactions ·
-
enhancement help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
box/ClusterRunner#411 · 1 comment ·
All issues in box/ClusterRunner
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100