Class NoDelayProvisionerStrategy
- All Implemented Interfaces:
ExtensionPoint
By default, Jenkins' NodeProvisioner runs on a periodic timer with
dampening heuristics that delay provisioning. This strategy bypasses those delays by:
- Running at high priority (
ordinal=100), before the default strategy. - Provisioning the exact number of agents needed immediately.
- Returning
PROVISIONING_COMPLETEDto skip the default strategy entirely.
While KubeVirt VMs take longer to boot than containers, we still want to start provisioning immediately. The delay eliminated here is between "build enters queue" and "provisioning is triggered", not the VM boot time itself.
This works in tandem with the NoDelayProvisionerStrategy.FastProvisioning queue listener (inner class),
which wakes up the NodeProvisioner the instant a buildable item enters the
queue, converting Jenkins' periodic polling model into an event-driven one.
Can be disabled via system property at JVM startup:
-Dio.jenkins.plugins.kubevirt.disableNoDelayProvisioning=true
or at runtime in the script console (no restart):
io.jenkins.plugins.kubevirt.NoDelayProvisionerStrategy.DISABLE_NO_DELAY = true
When several KubeVirtCloud instances are configured, this strategy visits them in
round-robin order (see plugin README). Rotation can be disabled to always use Jenkins cloud
list order:
-DNoDelayProvisionerStrategy.disableCloudRotation=true
or NoDelayProvisionerStrategy.DISABLE_CLOUD_ROTATION = true in the script console.
The legacy property NoDelayProvisionerStrategy.disableCloudShuffle is still honored.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEvent-driven queue listener that wakes up theNodeProvisionerimmediately when a new buildable item enters the queue and aKubeVirtCloudcan serve it.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic boolean -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DISABLE_NO_DELAY
public static boolean DISABLE_NO_DELAY -
DISABLE_CLOUD_ROTATION
public static boolean DISABLE_CLOUD_ROTATION
-
-
Constructor Details
-
NoDelayProvisionerStrategy
public NoDelayProvisionerStrategy()
-
-
Method Details
-
apply
- Specified by:
applyin classNodeProvisioner.Strategy
-