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

ec2 plugin fails to delete the instance from jenkins after terminating the instance

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ec2-plugin
    • None

      EC2 plugin fails to delete the instances even though the instance is terminated on the AWS console.

      There is no log found on jenkins.log. The executor shows that there is a job running. But the job has already completed execution and is supposed to leave.

      Also verified that dir of the instance is deleted from <JENKINS_HOME>/nodes

      I see a message on the instance "Node is being removed"

      Pasted the screenshot for reference

      There are multiple such instances on my Jenkins which are sticky.

          [JENKINS-68411] ec2 plugin fails to delete the instance from jenkins after terminating the instance

          Luke added a comment -

          I'm also seeing the same issue, triggered when having to restart Jenkins manually. All nodes that were "running" (stalled) jobs get stuck in a state of deleting. 

          The Jenkins log states that they are removed:

          build_jenkins.1.toxtlnyffrkh@ip-10-100-5-101.eu-west-2.compute.internal    | 2023-09-05 08:29:58.183+0000 [id=1729]	INFO	h.plugins.ec2.EC2OndemandSlave#lambda$terminate$0: Terminated EC2 instance (terminated): i-007ffa7752d227fd4
          build_jenkins.1.toxtlnyffrkh@ip-10-100-5-101.eu-west-2.compute.internal    | 2023-09-05 08:29:58.414+0000 [id=1729]	INFO	h.plugins.ec2.EC2OndemandSlave#lambda$terminate$0: Removed EC2 instance from jenkins controller: i-007ffa7752d227fd4
          

          But we still see them in the UI like anianna showed in their screenshot.

          Is more information required for this issue to be picked up?

          Luke added a comment - I'm also seeing the same issue, triggered when having to restart Jenkins manually. All nodes that were "running" (stalled) jobs get stuck in a state of deleting.  The Jenkins log states that they are removed: build_jenkins.1.toxtlnyffrkh@ip-10-100-5-101.eu-west-2.compute.internal | 2023-09-05 08:29:58.183+0000 [id=1729] INFO h.plugins.ec2.EC2OndemandSlave#lambda$terminate$0: Terminated EC2 instance (terminated): i-007ffa7752d227fd4 build_jenkins.1.toxtlnyffrkh@ip-10-100-5-101.eu-west-2.compute.internal | 2023-09-05 08:29:58.414+0000 [id=1729] INFO h.plugins.ec2.EC2OndemandSlave#lambda$terminate$0: Removed EC2 instance from jenkins controller: i-007ffa7752d227fd4 But we still see them in the UI like anianna showed in their screenshot. Is more information required for this issue to be picked up?

            lamanus Daeho Ro
            anianna Avaneesh
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: