Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #66 from mriddle/master
JENKINS-19500 Remove slave from Jenkins even when instance termination fails
- Loading branch information
Showing
with
8 additions
and
6 deletions.
-
+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); |
|
|
} |
|
|
} |
|
|
|
|
|
/** |
|
|