Package org.jenkinsci.plugins.proxmox
Class ProxmoxMinimumInstances
java.lang.Object
org.jenkinsci.plugins.proxmox.ProxmoxMinimumInstances
Keeps a per-template warm pool: provisions agents until every template with
instanceMin > 0
has that many functional instances running, bounded by the template and cloud instance caps. Mirrors
the EC2 plugin's MinimumInstanceChecker: every check runs serialized on a single background
thread via scheduleCheck(), so callers (the periodic orphan-cleanup work, config save,
startup) never block on provisioning. The retention strategy preserves the minimum by not
idle-reaping below it; this class restores the count after a max-uses recycle or any other drop.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTop up warm pools when the global config (clouds/templates) is saved. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidProvision toward every template'sinstanceMin.static voidinit()Top up warm pools at startup (analog of the EC2 plugin's PluginImpl.postInitialize).static voidSchedule a minimum-instance check to run asynchronously, so the caller returns immediately.
-
Method Details
-
scheduleCheck
public static void scheduleCheck()Schedule a minimum-instance check to run asynchronously, so the caller returns immediately. -
checkForMinimumInstances
public static void checkForMinimumInstances()Provision toward every template'sinstanceMin. Synchronized as a belt-and-suspenders guard on top of the single-thread executor. Blocks while provisioning (it runs on the dedicated thread), so by the time it returns the new agents are registered and counted, which prevents the next check from over-provisioning the same deficit. -
init
Top up warm pools at startup (analog of the EC2 plugin's PluginImpl.postInitialize).
-