Repository: mesos Updated Branches: refs/heads/master cc3ee7aad -> da2fc8da2
Improved logs displayed after a slave failed recovery. Add some steps to clean the Docker daemon state used by the Docker containerizer. Review: https://reviews.apache.org/r/64379/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/da2fc8da Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/da2fc8da Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/da2fc8da Branch: refs/heads/master Commit: da2fc8da2446346d9f5369dafa7db1345f0541cf Parents: cc3ee7a Author: Armand Grillet <agril...@mesosphere.io> Authored: Tue Dec 19 19:34:42 2017 +0100 Committer: Alexander Rukletsov <al...@apache.org> Committed: Tue Dec 19 19:34:42 2017 +0100 ---------------------------------------------------------------------- src/slave/slave.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/da2fc8da/src/slave/slave.cpp ---------------------------------------------------------------------- diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp index 580ad19..0093561 100644 --- a/src/slave/slave.cpp +++ b/src/slave/slave.cpp @@ -6751,10 +6751,23 @@ void Slave::__recover(const Future<Nothing>& future) EXIT(EXIT_FAILURE) << "Failed to perform recovery: " << (future.isFailed() ? future.failure() : "future discarded") << "\n" - << "To remedy this do as follows:\n" - << "Step 1: rm -f " << paths::getLatestSlavePath(metaDir) << "\n" - << " This ensures agent doesn't recover old live executors.\n" - << "Step 2: Restart the agent."; + << "If recovery failed due to a change in configuration and you want to\n" + << "keep the current agent id, you might want to change the\n" + << "`--reconfiguration_policy` flag to a more permissive value.\n" + << "\n" + << "To restart this agent with a new agent id instead, do as follows:\n" + << "rm -f " << paths::getLatestSlavePath(metaDir) << "\n" + << "This ensures that the agent does not recover old live executors.\n" + << "\n" + << "If you use the Docker containerizer and think that the Docker\n" + << "daemon state is broken, you can try to clear it. But be careful:\n" + << "these commands will erase all containers and images from this host,\n" + << "not just those started by Mesos!\n" + << "docker kill $(docker ps -q)\n" + << "docker rm $(docker ps -a -q)\n" + << "docker rmi $(docker images -q)\n" + << "\n" + << "Finally, restart the agent."; } LOG(INFO) << "Finished recovery";