Skip to content
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

Feature suggestion: More actions for the workers #5833

Open
YngveNPettersen opened this issue Mar 1, 2021 · 1 comment
Open

Feature suggestion: More actions for the workers #5833

YngveNPettersen opened this issue Mar 1, 2021 · 1 comment

Comments

@YngveNPettersen
Copy link
Contributor

The current Worker Actions dialog offer three options

  • Graceful shutdown
  • Forced shutdown
  • Pause/unpause

Our system have two special variant actions piggybacking on the graceful shutdown action: Rebooting the machine, and restarting the buildbot worker without a reboot.

Rebooting is done for some of our workers in order to clear the system of processes that might remain hanging after the previous run.

Restarting the buildbot worker is usually used to force an upgrade of the source code and configuration of the buildbot worker, e.g during a major buildbot update.

Others may want to have other actions for their workers.

My suggestion is to allow specification of arbitrary actions handled by one or more callbacks to the worker subclass, some extra actions should always be present, such as "Reboot" and "worker restart".

Related to this, I think there should be one or more possible actions in case of various error conditions in the worker. As an example, if the worker is not able to connect to the manager due to the certificate no longer being valid, or the manager hostname changed, it should be possible to automatically refresh the configuration using special actions, e.g by. initiating a "restart worker" function.

@tardyp
Copy link
Member

tardyp commented Mar 2, 2021

I think the use case makes sense.

It is a bit complicated as it involve all the communication layers of buildbot.
You will need to add this custom worker action notion in the UI, in the rest api actions, in the master to worker protocol, and in the worker.

On tricky way to do it might be to have a "force build on worker" functionality, which would use of nextWorker callback to force the worker choice for the build.
And then you implement your very special worker action as a build step.

If you create a special WorkerChoiceParameter, you would then filter the forcescheduler that have one of those parameter configured in and display it as a worker action in the UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants