In QB 9.0.9, when we "Pause System" in "Administration->System Setting", running builds finish their current step but the next step in the build gets stuck with "waiting" status and the information link states "unknown reason". This did not happen in our previously installed QB version 8.0.36. Did this policy change in new versions? On QB 9.0.9 "System Settings" page, the description still says "Check this to pause the system to prevent new builds from running (already running builds will not be affected)."
The description of pausing system is not accurate. It should be "already running steps will not be affected". In QB8 the step processing has a bug and it can bypass this setting when it uses the node selection setting "use same node as parent step", and it was fixed in QB9.
Bummer. We relied on the previous functionality quite heavily. That is, occasionally we need to take an agent offline for maintenance... so we would pause the system until that agent finishes any builds it is currently running. Now we can't do this anymore?
It should be "already running steps will not be affected".
Unless it's a "composite step".
we realize it as follows.
We have two nodes are numbered NODE01 and NODE02. In the Masterstep we have defined the agents selection as follows
The variable **QBNodes **is normally equal to NODE0. If we now have to shut down one agent e.g. NODE01, for updates, we set the variable QBNodes to the other agent name (e.g. NODE02) and for the following builds only the agent NODE02 is taken and the other agent runs empty.
This has been an issue since version 4.0 at least. I may have filed a ticket for it once upon a time.
The workaround my team used was as follows:
- create a root-level variable systemShutDownPending=false
- create a root-level pre-queue script:
groovy: vars.get("systemShutDownPending").asBoolean() ? false : true;
By setting systemShutDownPending=true, no new builds will start (either by schedule or by hand), but currently-running builds will continue to completion. You could also add a maintenance configuration to toggle this value.