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

[ec2-plugin] Unable to delete slave for spot request that no longer exists.

      Not the same as JENKINS-17410. Stack trace here.

      When deleting a Jenkins Slave for a Spot Instance request that no longer exists the EC2-Plugin throws the error linked above.

      Currently the only way to resolve the issue is to modify the config.xml and restart Jenkins.

      I believe this can be resolve by updating hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:95) method to return null when unable to retrieve SpotInstanceRequest for given ID.
      Will give it a go.

          [JENKINS-19500] [ec2-plugin] Unable to delete slave for spot request that no longer exists.

          Matthew Riddle added a comment - - edited

          Identified the issue, it was fixed by updating hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:95) method to return null when unable to retrieve SpotInstanceRequest for given ID.

          Have updated the plugin and created a pull-request here: https://github.com/jenkinsci/ec2-plugin/pull/65

          Matthew Riddle added a comment - - edited Identified the issue, it was fixed by updating hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:95) method to return null when unable to retrieve SpotInstanceRequest for given ID. Have updated the plugin and created a pull-request here: https://github.com/jenkinsci/ec2-plugin/pull/65

          Code changed in jenkins
          User: Matthew Riddle
          Path:
          src/main/java/hudson/plugins/ec2/EC2SpotSlave.java
          http://jenkins-ci.org/commit/ec2-plugin/6a105ea81120820817d1cc6cf94ff87da34fdaa1
          Log:
          JENKINS-19500 Fix: Unable to delete slave for spot request that no longer exists.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Matthew Riddle Path: src/main/java/hudson/plugins/ec2/EC2SpotSlave.java http://jenkins-ci.org/commit/ec2-plugin/6a105ea81120820817d1cc6cf94ff87da34fdaa1 Log: JENKINS-19500 Fix: Unable to delete slave for spot request that no longer exists.

          Code changed in jenkins
          User: Francis Upton
          Path:
          src/main/java/hudson/plugins/ec2/EC2SpotSlave.java
          http://jenkins-ci.org/commit/ec2-plugin/53d256ae988304ebd765bcc33d0b8d47694c1ce7
          Log:
          Merge pull request #65 from mriddle/master

          JENKINS-19500 Fix: Unable to delete slave for spot request that no longer exists.

          Compare: https://github.com/jenkinsci/ec2-plugin/compare/c33e297f2c3c...53d256ae9883

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton Path: src/main/java/hudson/plugins/ec2/EC2SpotSlave.java http://jenkins-ci.org/commit/ec2-plugin/53d256ae988304ebd765bcc33d0b8d47694c1ce7 Log: Merge pull request #65 from mriddle/master JENKINS-19500 Fix: Unable to delete slave for spot request that no longer exists. Compare: https://github.com/jenkinsci/ec2-plugin/compare/c33e297f2c3c...53d256ae9883

          Thanks for the prompt merge

          Matthew Riddle added a comment - Thanks for the prompt merge

          Matthew Riddle added a comment - - edited

          Issue was not resolved.

          Jenkins no longer ran into exception but user still left unable to resolve instance.

          Never reached

          Hudson.getInstance().removeNode(this); // EC2SpotSlave.java:72 

          Matthew Riddle added a comment - - edited Issue was not resolved. Jenkins no longer ran into exception but user still left unable to resolve instance. Never reached Hudson.getInstance().removeNode( this ); // EC2SpotSlave.java:72

          Code changed in jenkins
          User: Matt Riddle
          Path:
          src/main/java/hudson/plugins/ec2/EC2SpotSlave.java
          http://jenkins-ci.org/commit/ec2-plugin/11693e7be0f4fe2b9979aaad1074725f9056921e
          Log:
          JENKINS-19500 Fix: Remove slave from Jenkins even when instance termination fails

          Since we assume that the Spot request is no longer valid if an AmazonClientException/AmazonServiceException occurs

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Matt Riddle Path: src/main/java/hudson/plugins/ec2/EC2SpotSlave.java http://jenkins-ci.org/commit/ec2-plugin/11693e7be0f4fe2b9979aaad1074725f9056921e Log: JENKINS-19500 Fix: Remove slave from Jenkins even when instance termination fails Since we assume that the Spot request is no longer valid if an AmazonClientException/AmazonServiceException occurs

          Code changed in jenkins
          User: Francis Upton
          Path:
          src/main/java/hudson/plugins/ec2/EC2SpotSlave.java
          http://jenkins-ci.org/commit/ec2-plugin/0698416bb8231056b0a84a6f55df2511630e5499
          Log:
          Merge pull request #66 from mriddle/master

          JENKINS-19500 Remove slave from Jenkins even when instance termination fails

          Compare: https://github.com/jenkinsci/ec2-plugin/compare/53d256ae9883...0698416bb823

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton Path: src/main/java/hudson/plugins/ec2/EC2SpotSlave.java http://jenkins-ci.org/commit/ec2-plugin/0698416bb8231056b0a84a6f55df2511630e5499 Log: Merge pull request #66 from mriddle/master JENKINS-19500 Remove slave from Jenkins even when instance termination fails Compare: https://github.com/jenkinsci/ec2-plugin/compare/53d256ae9883...0698416bb823

          Resolved by merge

          Matthew Riddle added a comment - Resolved by merge

            mriddle Matthew Riddle
            mriddle Matthew Riddle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: