-
Notifications
You must be signed in to change notification settings - Fork 1
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
Drop platform: advice to shutdown workers #39
Conversation
When dropping a platform it is best to first disable the relevant workers. Otherwise the workers will eventually recreate the platform.
So, what are the overall expectations?
But, there's no persistence of dropped platforms (should there be some)? So, a restart of the builder-server and a connecting builder-worker will execute such jobs again -- is this fine? do we want to persist the list of dropped platforms? (I think I'm in favour thereof). Also, I'd like the find_job to figure that the platform is dropped (and close the worker connection).. |
it's not clear to me what a good way forward is. It is not nice to leave workers hanging. Closing the connection or terminating the worker is nice except we usually put our workers in an infinite loop involving installing a lot of packages; so that is not desirable. Maybe persisting dropped platforms and refusing to drop a platform we have workers connecting thereby forcing a flow where the workers are first shut down. Then we still have the corner case where a worker is "rebooting" while the platform is dropped. Hmm. |
Oh, another path is server-only: persist the dropped platforms, and just don't ever give such a worker a job. Thus the worker will be there and alive, but not receiving anything. IMHO that would be fine. |
I added a commit to persist dropped platforms. Then I realized we might want to be able to "undrop" a platform. I have not yet added the command in the client, and I need to bump a version number somewhere. I think the logic is not so easy to follow now. |
Which logic is not so easy to follow? The list of dropped platforms should also be inspectable (i.e. printed in the info output or such). |
fine to merge when CI is happy |
CHANGES: * improve documentation (robur-coop/builder#37 et al, fixes robur-coop/builder#27) * adapt to asn1-combinators 0.3.0 API: remove cstruct (robur-coop/builder#49 @hannesm) * queue up observe messages (robur-coop/builder#48 @reynir) * use "/job/_/build/_/main-binary" alias - eases bootstrapping (robur-coop/builder#42 @reynir) * drop platform: advice to shutdown workers (robur-coop/builder#39 @reynir) * FreeBSD: add builder_worker service script (robur-coop/builder#37 @hannesm) * client: enumerate valid periods in `--help` (robur-coop/builder#36 @reynir) * add an interval of "never" to never schedule a job (robur-coop/builder#34 @hannesm, fixes robur-coop/builder#32) * client: observe omit the UUID (robur-coop/builder#33 @hannesm)
CHANGES: * improve documentation (robur-coop/builder#37 et al, fixes robur-coop/builder#27) * adapt to asn1-combinators 0.3.0 API: remove cstruct (robur-coop/builder#49 @hannesm) * queue up observe messages (robur-coop/builder#48 @reynir) * use "/job/_/build/_/main-binary" alias - eases bootstrapping (robur-coop/builder#42 @reynir) * drop platform: advice to shutdown workers (robur-coop/builder#39 @reynir) * FreeBSD: add builder_worker service script (robur-coop/builder#37 @hannesm) * client: enumerate valid periods in `--help` (robur-coop/builder#36 @reynir) * add an interval of "never" to never schedule a job (robur-coop/builder#34 @hannesm, fixes robur-coop/builder#32) * client: observe omit the UUID (robur-coop/builder#33 @hannesm)
CHANGES: * improve documentation (robur-coop/builder#37 et al, fixes robur-coop/builder#27) * adapt to asn1-combinators 0.3.0 API: remove cstruct (robur-coop/builder#49 @hannesm) * queue up observe messages (robur-coop/builder#48 @reynir) * use "/job/_/build/_/main-binary" alias - eases bootstrapping (robur-coop/builder#42 @reynir) * drop platform: advice to shutdown workers (robur-coop/builder#39 @reynir) * FreeBSD: add builder_worker service script (robur-coop/builder#37 @hannesm) * client: enumerate valid periods in `--help` (robur-coop/builder#36 @reynir) * add an interval of "never" to never schedule a job (robur-coop/builder#34 @hannesm, fixes robur-coop/builder#32) * client: observe omit the UUID (robur-coop/builder#33 @hannesm)
When dropping a platform it is best to first disable the relevant workers. Otherwise the workers will eventually recreate the platform.
Fixes #38