You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ma...@apache.org on 2014/12/11 20:59:20 UTC

incubator-aurora git commit: More logging in MaintenanceController.

Repository: incubator-aurora
Updated Branches:
  refs/heads/master 5542c5561 -> dabe63a69


More logging in MaintenanceController.

Bugs closed: AURORA-935

Reviewed at https://reviews.apache.org/r/28806/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/dabe63a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/dabe63a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/dabe63a6

Branch: refs/heads/master
Commit: dabe63a6987a12880b93bc532a7c7b286bc0c084
Parents: 5542c55
Author: Maxim Khutornenko <ma...@apache.org>
Authored: Thu Dec 11 11:58:59 2014 -0800
Committer: -l <ma...@apache.org>
Committed: Thu Dec 11 11:58:59 2014 -0800

----------------------------------------------------------------------
 .../apache/aurora/scheduler/state/MaintenanceController.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/dabe63a6/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java b/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
index 8e6f4e7..9158271 100644
--- a/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
+++ b/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
@@ -41,6 +41,7 @@ import org.apache.aurora.scheduler.storage.Storage.MutateWork;
 import org.apache.aurora.scheduler.storage.Storage.StoreProvider;
 import org.apache.aurora.scheduler.storage.Storage.Work;
 import org.apache.aurora.scheduler.storage.entities.IHostAttributes;
+import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
 
 import static java.util.Objects.requireNonNull;
 
@@ -160,8 +161,13 @@ public interface MaintenanceController {
                 store.getAttributeStore().getHostAttributes(host);
             if (attributes.isPresent() && attributes.get().getMode() == DRAINING) {
               Query.Builder builder = Query.slaveScoped(host).active();
-              if (store.getTaskStore().fetchTasks(builder).isEmpty()) {
+              Set<IScheduledTask> activeTasks = store.getTaskStore().fetchTasks(builder);
+              if (activeTasks.isEmpty()) {
+                LOG.info(String.format("Moving host %s into DRAINED", host));
                 setMaintenanceMode(store, ImmutableSet.of(host), DRAINED);
+              } else {
+                LOG.info(
+                    String.format("Host %s is DRAINING with active tasks: %s", host, activeTasks));
               }
             }
           }