Issue
After enabling High Availability (HA) (active/active) on a controller, builds can remain queued even though agents or cloud capacity appear to be available. This typically happens when one or more agents or agent templates are configured with more than one executor.
You will also see the following message in your pending build logs:
MyBuild#1 is using MyAgent
Environment
-
Cloudbees CI on modern cloud platforms - managed controller >= 2.516.3.29358, running in High Availability (active/active) mode
-
Cloudbees CI on traditional platforms - client controller >= 2.516.3.29358, running in High Availability (active/active) mode
Explanation
In HA (active/active) mode, each controller replica can only route a build to an agent connected to that same replica. An agent with multiple executors cannot have those executors shared across replicas. Because of this, Cloudbees CI does not support agents configured with more than one executor in HA (active/active) mode. Cloud-provisioned agents, such as Kubernetes agents, are usually not affected, because they normally define only one executor by default. This issue typically appears when an agent was configured with more than one executor before HA was enabled, or when a permanent or static agent is configured with multiple executors directly instead of using the HA-specific multi-executor option described in the Resolution section.
Resolution
-
Navigate to or depending on the type of agent.
-
Enter the configuration page for the desired agent.
-
Set Number of Executors to
1on the agent. -
For permanent or static agents that require more than one executor, do not set Number of Executors above
1directly. Instead, configure the agent to simulate a multi-executor agent for HA:-
In Node Properties select HA agent with multiple executors, then set the number of executors.
-
From Configuration as Code (CasC): keep
numExecutors: 1and add thecloudbeesHighAvailabilityMultipleExecutorsnode property with the requirednumExecutorsvalue. See example below:
-
jenkins: nodes: - permanent: launcher: "inbound" name: "MyAgent" nodeProperties: - cloudbeesHighAvailabilityMultipleExecutors: numExecutors: 2