aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject incubator-aurora git commit: More logging in MaintenanceController.
Date Thu, 11 Dec 2014 19:59:20 GMT
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 <maxim@apache.org>
Authored: Thu Dec 11 11:58:59 2014 -0800
Committer: -l <maxim@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));
               }
             }
           }


Mime
View raw message