[users at bb.net] Buildbot worker in Jenkins

Denis Ovsienko denis at ovsienko.info
Tue Apr 13 16:55:48 UTC 2021


[...]

> > Having written that, I suspect that the start and the stop commands
> > do not need to be in the master or the worker code base. It could
> > be a standalone cron job that uses the master HTTP API as follows:
> > 
> > ---------------------------------------------------------------
> > w = the worker behind Jenkins
> > if (w is offline AND has pending build requests)
> > {
> >   use Jenkins web hook to start the build that starts the worker
> > }
> > elif (w is online AND has no pending build requests)
> > {
> >   use the master HTTP API to request a graceful shutdown for the
> > worker }
> > ---------------------------------------------------------------
> > 
> > Would that be a better solution?
> >   
> 
> I will check what code I have and create a PR if it rebases cleanly to
> newer Buildbot. Then we have something concrete to discuss and it will
> be clear how it could address your problem.

To follow up on that, I have implemented the suggested idea and it seems
to do the job. That said, because the master is unaware about a
3rd-party script requesting a worker start through a 3-rd-party API,
the master considers the worker down until it has connected, and after
that the build details show the worker_preparation stage taking 0
seconds. Neither of that represent the worker state changes behind the
scenes properly: the worker starts to compose itself almost
immediately, but takes 10 minutes of real time to get into shape. So a
solution within the Buildbot space might be better long-term.

-- 
    Denis Ovsienko


More information about the users mailing list