From 0a088c6a0c98e9a3ccacb06fdc3b8d4149a1d1b4 Mon Sep 17 00:00:00 2001 From: David Pilato Date: Fri, 28 Jun 2013 15:49:18 +0200 Subject: [PATCH] Ignore TERMINATED instances When an instance is removed, its status become `TERMINATED`. As stated in [GCE Documentation](https://developers.google.com/compute/docs/instances#checkmachinestatus): > TERMINATED - The instance either failed for some reason or was shutdown. This is a permanent status, and the only way to repair the instance is to delete and recreate it. So we need to ignore instances with such a status. Closes #3. --- .../elasticsearch/cloud/gce/GceComputeService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/elasticsearch/cloud/gce/GceComputeService.java b/src/main/java/org/elasticsearch/cloud/gce/GceComputeService.java index 174dd283195..05be0ecdaf0 100644 --- a/src/main/java/org/elasticsearch/cloud/gce/GceComputeService.java +++ b/src/main/java/org/elasticsearch/cloud/gce/GceComputeService.java @@ -58,6 +58,10 @@ public class GceComputeService extends AbstractLifecycleComponent discoNodes; private TransportService transportService; private NetworkService networkService; @@ -114,6 +118,13 @@ public class GceComputeService extends AbstractLifecycleComponent 0) {