add --ephemeral mode for persistent worker#813
add --ephemeral mode for persistent worker#8130xB10C wants to merge 1 commit intocirruslabs:mainfrom
Conversation
|
This still needs a bit of work on the backend side, I think. Ideally, the backend would understand that the worker is ephemeral: the worker should tell the backend in some proto message, possibly When I run ephemeral workers with unique names, my worker pool grows quite fast with mostly inactive, old workers still present. When I reuse the same name, scheduling tasks after the VM comes back online sometimes doesn't work (the backend probably thinks it already assigned a task). Would love your input on this @fkorotkov. |
98c9305 to
2272915
Compare
|
Seem we'll need an option for the worker to unregister itself similar to |
Sounds good! I remember trying to use |
|
I've observed some of my --ephemeral runners not getting a task and log |
2272915 to
b410898
Compare
When passing `--ephemeral` to `cirrus worker run`, the worker will accept one task and then exit the process once the task completed. This can be used inside ephemeral VMs which should be shutdown after each task. A user has to take care of cleaning up after the worker has finished.
b410898 to
fa5c5a0
Compare
|
rebase and resolved conflicts |
|
I don't think the cirrus team is interested in merging this. I would have hoped for clearer communication on this from start, as this would have saved me a bunch of time working on this.. |
When passing
--ephemeraltocirrus worker run, the worker will accept one task and then exit the process once the task completed.This can be used inside e.g. ephemeral VMs which should be shutdown after each task. A user has to take care of cleaning up after the worker has finished.
resolves #809