Skip to content
Permalink
Browse files

Merge pull request #66 from mriddle/master

JENKINS-19500 Remove slave from Jenkins even when instance termination fails
  • Loading branch information
francisu committed Sep 22, 2013
2 parents 53d256a + 5d49a41 commit 0698416bb8231056b0a84a6f55df2511630e5499
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/main/java/hudson/plugins/ec2/EC2SpotSlave.java
@@ -69,18 +69,20 @@ public void terminate() {
}

}
Hudson.getInstance().removeNode(this);


} catch (AmazonServiceException e){
// Spot request is no longer valid
LOGGER.log(Level.WARNING, "Failed to terminated instance and cancel Spot request: " + spotInstanceRequestId);
LOGGER.log(Level.WARNING, "Failed to terminated instance and cancel Spot request: " + spotInstanceRequestId, e);
} catch (AmazonClientException e){
// Spot request is no longer valid
LOGGER.log(Level.WARNING, "Failed to terminated instance and cancel Spot request: " + spotInstanceRequestId);
} catch(IOException e){
LOGGER.log(Level.WARNING,"Failed to remove slave: "+name, e);
LOGGER.log(Level.WARNING, "Failed to terminated instance and cancel Spot request: " + spotInstanceRequestId, e);
}

try{
Hudson.getInstance().removeNode(this);
} catch (IOException e){
LOGGER.log(Level.WARNING,"Failed to remove slave: "+name, e);
}
}

/**

0 comments on commit 0698416

Please sign in to comment.
You can’t perform that action at this time.