Skip to content

Commit

Permalink
Merge pull request #503 from mesos/bug/481-ClusterTimeoutWhenScaling
Browse files Browse the repository at this point in the history
Add cluster yellow to list of valid run states.
  • Loading branch information
Phil Winder committed Feb 18, 2016
2 parents b03c4ff + d732f98 commit 63f159b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
public class ElasticsearchExecutor implements Executor {
public static final long ES_TIMEOUT = 120L;
public static final String ES_STATUS_GREEN = "green";
public static final String ES_STATUS_YELLOW = "yellow";
private final Launcher launcher;
public static final Logger LOGGER = Logger.getLogger(ElasticsearchExecutor.class.getCanonicalName());
private final TaskStatus taskStatus;
Expand Down Expand Up @@ -107,8 +108,7 @@ public void launchTask(final ExecutorDriver driver, final Protos.TaskInfo task)
Awaitility.await()
.atMost(ES_TIMEOUT, TimeUnit.SECONDS)
.pollInterval(1L, TimeUnit.SECONDS)
.until(() -> nodeUtil.getNodeStatus(node).equals(ES_STATUS_GREEN));

.until(() -> nodeUtil.getNodeStatus(node).equals(ES_STATUS_GREEN) || nodeUtil.getNodeStatus(node).equals(ES_STATUS_YELLOW));
// Send status update, running
driver.sendStatusUpdate(taskStatus.running());
} catch (ConditionTimeoutException e) {
Expand Down

0 comments on commit 63f159b

Please sign in to comment.