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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          mriddle 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

          Show
          mriddle 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
          Hide
          scm_issue_link 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.

          Show
          scm_issue_link 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.
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          mriddle Matthew Riddle added a comment -

          Thanks for the prompt merge

          Show
          mriddle Matthew Riddle added a comment - Thanks for the prompt merge
          Hide
          mriddle 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 

          Show
          mriddle 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          mriddle Matthew Riddle added a comment -

          Resolved by merge

          Show
          mriddle Matthew Riddle added a comment - Resolved by merge

            People

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

              Dates

              • Created:
                Updated:
                Resolved: