Closed
Bug 1441482
Opened 6 years ago
Closed 6 years ago
generic-worker should free up disk space *before* claiming a task
Categories
(Taskcluster :: Workers, enhancement)
Taskcluster
Workers
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pmoore, Assigned: pmoore)
References
Details
Attachments
(1 file)
It looks like currently generic-worker claims a task, and then attempts to free up enough disk space to run it. If it did this the other way around, it wouldn't claim a task when it didn't have enough disk space.
Assignee | ||
Comment 1•6 years ago
|
||
Currently the purging of caches is the responsibility of the MountsFeature. Unfortunately, features operate on claimed tasks, so in the current implementation, a task is claimed before the feature has had a chance to see if it can free up enough disk space for the task. When it becomes unable to execute the task, because it lacks disk space, it has no choice but to resolve the task with the exception state. This PR moves the purging of caches outside of the feature, into the generic worker task claim loop, immediately before a task is claimed. This way, the worker knows ahead of time that it won't be able to claim a task, and is able to exit gracefully, without sacrificing any task runs on the way. The reason it was originally implented like this, was to localise the management of caches to the feature that used them, and not dirty the core worker with these concerns. With this change, the generic-worker runtime now concerns itself with resource purging, but this probably isn't such a bad thing. In future, perhaps other features will want to register resources with the worker, and allow the worker to take care of purging them.
Comment 2•6 years ago
|
||
Commits pushed to master at https://github.com/taskcluster/generic-worker https://github.com/taskcluster/generic-worker/commit/8e417278998f10a5985481fafc90279c4b2098a7 Bug 1441482 - free up disk space between tasks, not when a task has already been claimed https://github.com/taskcluster/generic-worker/commit/af05f501c2958029f4029f0d311ccb149038f0d7 Merge pull request #75 from taskcluster/bug1441482 Bug 1441482 - free up disk space between tasks, not after task claim
Updated•6 years ago
|
Attachment #8954671 -
Flags: review?(jhford) → review+
Assignee | ||
Comment 3•6 years ago
|
||
Released in generic-worker 10.6.0.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: Generic-Worker → Workers
You need to log in
before you can comment on or make changes to this bug.
Description
•