Stopped but not suspended Azure VM Agent is not restarted

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We're making use of the Azure VM Agents Plugin to create and maintain agents based on a custom .vhd file.
      The key info for that custom image is:

      • Windows OS
      • JNLP connection to Jenkins Master
      • "Shutdown Only (Do Not Delete) After Retention Time" option is enabled

      Such an agent node can have two flags shown in the Jenkins sidebar: "offline" and "suspended". While everything runs as expected, we do not manually start/stop the agent VMs.
      However, the stop (i.e. deallocate) command triggered by the Azure VM Agents Plugin once the retention time is up results in the JNLP connection to get closed before Jenkins marks the node as "suspended". When a job that is supposed to be built on that agents is triggered, the node (which is shown as "offline", but not "suspended") is never started by the plugin. The job waits indefinitely until it is cancelled or the agents is being started manually (i.e. via the Azure Portal or CLI).

      This doesn't happen all the time. Sometimes, the node is marked as "suspended" before the JNLP connection is closed and the agent is being started the next time it is required – i.e. as expected.

            Assignee:
            Chenyang Liu
            Reporter:
            Carsten Wickner
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: