Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49021

Stopped but not suspended Azure VM Agent is not restarted

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • _unsorted
    • Jenkins ver. 2.89.2 with Azure VM Agents Plugin ver. 0.6.0

      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.

          [JENKINS-49021] Stopped but not suspended Azure VM Agent is not restarted

          Carsten Wickner created issue -
          Carsten Wickner made changes -
          Description Original: We're making use of the Azure VM Agents Plugin to create and maintain agents based on a custom {{.vhd}} file.
          The custom image contains a Windows that registers itself via JNLP at the Jenkins Master.
          The "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 results in the JNLP connection to get closed before Jenkins marks the node as "suspended". When the 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.
          New: We're making use of the Azure VM Agents Plugin to create and maintain agents based on a custom {{.vhd}} file.
          The custom image contains a Windows that registers itself via JNLP at the Jenkins Master.
          The "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.
          Carsten Wickner made changes -
          Description Original: We're making use of the Azure VM Agents Plugin to create and maintain agents based on a custom {{.vhd}} file.
          The custom image contains a Windows that registers itself via JNLP at the Jenkins Master.
          The "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.
          New: 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.
          Azure DevOps made changes -
          Assignee Original: Azure DevOps [ azure_devops ] New: Chenyang Liu [ zackliu ]
          Pui Chee Chan made changes -
          Labels New: azure-jenkins in-progress
          Jakub Michalec made changes -
          Chenyang Liu made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Jenkins IRC Bot made changes -
          Component/s New: _unsorted [ 19622 ]
          Component/s Original: azure-vm-agents-plugin [ 21950 ]

            zackliu Chenyang Liu
            carstenenglert Carsten Wickner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: