You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2017/09/29 20:31:40 UTC

[07/11] mesos git commit: Removed the logic for removing the latest symlink on the agent.

Removed the logic for removing the latest symlink on the agent.

This change removes the logic of removing the latest symlink on
receiving the shutdown message from the Mesos master. This ensures
that agents come back with the same agent ID upon a successful
shutdown similar to the behavior when they come back post a reboot.

Review: https://reviews.apache.org/r/62479/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3da4f8a6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3da4f8a6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3da4f8a6

Branch: refs/heads/master
Commit: 3da4f8a6525a903187f25489d699c46af6120d3c
Parents: 57873eb
Author: Anand Mazumdar <an...@apache.org>
Authored: Fri Sep 29 11:57:50 2017 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Fri Sep 29 13:31:08 2017 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 9 ---------
 1 file changed, 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3da4f8a6/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 75e2e25..bf85baf 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -886,15 +886,6 @@ void Slave::finalize()
       shutdownFramework(UPID(), frameworkId);
     }
   }
-
-  if (state == TERMINATING) {
-    // We remove the "latest" symlink in meta directory, so that the
-    // slave doesn't recover the state when it restarts and registers
-    // as a new slave with the master.
-    if (os::exists(paths::getLatestSlavePath(metaDir))) {
-      CHECK_SOME(os::rm(paths::getLatestSlavePath(metaDir)));
-    }
-  }
 }