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

Unable to delete Azure VM Agent from Jenkins after having deleted agent directly on Azure

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: azure-vm-agents-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.105, Azure VM Agent 0.6.0
    • Similar Issues:

      Description

      Hi,

      I made a mistake by deleting a resource group on azure which was managed by Jenkins.

      Now the node still appear on Jenkins but I can't delete it anymore, so in each build, my jobs are complaining that the node is down before spawning an other one.

      Here is the stacktrace when I try to delete the agent from Jenkins

       

      Feb 09, 2018 9:46:02 AM INFO jenkins.branch.MultiBranchProject$BranchIndexing run
      Assurance_14 #20180209.094600 branch indexing action completed: SUCCESS in 1.3 sec
      Feb 09, 2018 9:46:36 AM INFO hudson.model.AsyncPeriodicWork$1 run
      Started Azure VM Agents Clean Task
      Feb 09, 2018 9:46:36 AM INFO com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask execute
      AzureVMAgentCleanUpTask: execute: start
      Feb 09, 2018 9:46:36 AM INFO com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask execute
      AzureVMAgentCleanUpTask: execute: Running clean with 5 minute timeout
      Feb 09, 2018 9:46:36 AM SEVERE com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask execute
      AzureVMAgentCleanUpTask: execute: Got execution exception while cleaning
      java.lang.NullPointerException
      	at com.microsoft.azure.vmagent.AzureVMAgent.getServiceDelegate(AzureVMAgent.java:499)
      	at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.virtualMachineExists(AzureVMManagementServiceDelegate.java:718)
      	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.cleanVMs(AzureVMAgentCleanUpTask.java:501)
      	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.cleanVMs(AzureVMAgentCleanUpTask.java:461)
      	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.clean(AzureVMAgentCleanUpTask.java:569)
      	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.access$200(AzureVMAgentCleanUpTask.java:64)
      	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask$3.call(AzureVMAgentCleanUpTask.java:583)
      	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask$3.call(AzureVMAgentCleanUpTask.java:580)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      Caused: java.util.concurrent.ExecutionException
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:206)
      	at com.microsoft.azure.vmagent.AzureVMAgentCleanUpTask.execute(AzureVMAgentCleanUpTask.java:593)
      	at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:101)
      	at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

          Hide
          zackliu Chenyang Liu added a comment -

          Seems you had deleted the cloud in configuration at that time, so got a NullPointerException. Did you meet the same issue later.

          Show
          zackliu Chenyang Liu added a comment - Seems you had deleted the cloud in configuration at that time, so got a  NullPointerException . Did you meet the same issue later.
          Hide
          abouquet Anthony BOUQUET added a comment -

          Haven't deleted it but have renamed it once. The issue should maybe come from there ? 

          Still have this issue now when trying to delete the agent. (can't delete it atm)

           

          Show
          abouquet Anthony BOUQUET added a comment - Haven't deleted it but have renamed it once. The issue should maybe come from there ?  Still have this issue now when trying to delete the agent. (can't delete it atm)  
          Hide
          zackliu Chenyang Liu added a comment -

          Do you means you can't even delete the vm manually or can't be deleted by plugin automatically?

          Show
          zackliu Chenyang Liu added a comment - Do you means you can't even delete the vm manually or can't be deleted by plugin automatically?
          Hide
          zackliu Chenyang Liu added a comment -

          Sorry it's a long time, but it should have resolved in 0.7.1

          Show
          zackliu Chenyang Liu added a comment - Sorry it's a long time, but it should have resolved in 0.7.1

            People

            • Assignee:
              zackliu Chenyang Liu
              Reporter:
              abouquet Anthony BOUQUET
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: