[15/16] mesos git commit: Updated fetcher tests to reflect changed interfaces.

2017-05-25 Thread josephwu
Updated fetcher tests to reflect changed interfaces.

There are two primary changes to the tests:
  * The arguments passed to the fetcher's methods no longer contain
the Flags or SlaveID.  So a couple of the mock expectations need
to be tweaked.
  * Flags are now passed into the fetcher at construction.  Some of
the tests modify the flags after construction, so the order of
operations needed to be flipped.

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


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

Branch: refs/heads/master
Commit: 391ced51552f4917fd3fe33f1003391ce7d01f75
Parents: c66f7e2
Author: Joseph Wu 
Authored: Wed May 10 17:16:49 2017 -0700
Committer: Joseph Wu 
Committed: Thu May 25 18:37:08 2017 -0700

--
 src/tests/fetcher_cache_tests.cpp |  91 ++
 src/tests/fetcher_tests.cpp   | 135 +
 2 files changed, 94 insertions(+), 132 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/391ced51/src/tests/fetcher_cache_tests.cpp
--
diff --git a/src/tests/fetcher_cache_tests.cpp 
b/src/tests/fetcher_cache_tests.cpp
index c6ba79a..1edd15c 100644
--- a/src/tests/fetcher_cache_tests.cpp
+++ b/src/tests/fetcher_cache_tests.cpp
@@ -153,7 +153,6 @@ protected:
   string assetsDirectory;
   string commandPath;
   string archivePath;
-  string cacheDirectory;
 
   Owned master;
   Owned slave;
@@ -199,9 +198,6 @@ void FetcherCacheTest::SetUp()
   ASSERT_SOME(_master);
   master = _master.get();
 
-  fetcherProcess = new MockFetcherProcess();
-  fetcher.reset(new Fetcher(Owned(fetcherProcess)));
-
   FrameworkInfo frameworkInfo;
   frameworkInfo.set_name("default");
   frameworkInfo.set_checkpoint(true);
@@ -282,6 +278,9 @@ void FetcherCacheTest::TearDown()
 // available for all testing as possible.
 void FetcherCacheTest::startSlave()
 {
+  fetcherProcess = new MockFetcherProcess(flags);
+  fetcher.reset(new Fetcher(Owned(fetcherProcess)));
+
   Try create = MesosContainerizer::create(
   flags, true, fetcher.get());
 
@@ -300,9 +299,6 @@ void FetcherCacheTest::startSlave()
 
   AWAIT_READY(slaveRegisteredMessage);
   slaveId = slaveRegisteredMessage->slave_id();
-
-  cacheDirectory =
-slave::paths::getSlavePath(flags.fetcher_cache_dir, slaveId);
 }
 
 
@@ -517,7 +513,7 @@ Try 
FetcherCacheTest::launchTasks(
   // When _fetch() is called, notify us by satisfying a promise that
   // a task has passed the code stretch in which it competes for cache
   // entries.
-  EXPECT_CALL(*fetcherProcess, _fetch(_, _, _, _, _, _))
+  EXPECT_CALL(*fetcherProcess, _fetch(_, _, _, _, _))
 .WillRepeatedly(
 DoAll(SatisfyOne(),
   Invoke(fetcherProcess, ::unmocked__fetch)));
@@ -620,8 +616,8 @@ TEST_F(FetcherCacheTest, LocalUncached)
   AWAIT_READY(awaitFinished(task.get()));
 
   EXPECT_EQ(0u, fetcherProcess->cacheSize());
-  ASSERT_SOME(fetcherProcess->cacheFiles(slaveId, flags));
-  EXPECT_EQ(0u, fetcherProcess->cacheFiles(slaveId, flags)->size());
+  ASSERT_SOME(fetcherProcess->cacheFiles());
+  EXPECT_EQ(0u, fetcherProcess->cacheFiles()->size());
 
   const string path = path::join(task->runDirectory.string(), COMMAND_NAME);
   EXPECT_TRUE(isExecutable(path));
@@ -657,8 +653,8 @@ TEST_F(FetcherCacheTest, LocalCached)
 EXPECT_TRUE(os::exists(path + taskName(i)));
 
 EXPECT_EQ(1u, fetcherProcess->cacheSize());
-ASSERT_SOME(fetcherProcess->cacheFiles(slaveId, flags));
-EXPECT_EQ(1u, fetcherProcess->cacheFiles(slaveId, flags)->size());
+ASSERT_SOME(fetcherProcess->cacheFiles());
+EXPECT_EQ(1u, fetcherProcess->cacheFiles()->size());
   }
 }
 
@@ -686,8 +682,8 @@ TEST_F(FetcherCacheTest, CachedCustomFilename)
   AWAIT_READY(awaitFinished(task.get()));
 
   EXPECT_EQ(1u, fetcherProcess->cacheSize());
-  ASSERT_SOME(fetcherProcess->cacheFiles(slaveId, flags));
-  EXPECT_EQ(1u, fetcherProcess->cacheFiles(slaveId, flags)->size());
+  ASSERT_SOME(fetcherProcess->cacheFiles());
+  EXPECT_EQ(1u, fetcherProcess->cacheFiles()->size());
 
   // Verify that the downloaded executable lives at our custom output path.
   const string executablePath = path::join(
@@ -728,8 +724,8 @@ TEST_F(FetcherCacheTest, 
CachedCustomOutputFileWithSubdirectory)
   AWAIT_READY(awaitFinished(task.get()));
 
   EXPECT_EQ(1u, fetcherProcess->cacheSize());
-  ASSERT_SOME(fetcherProcess->cacheFiles(slaveId, flags));
-  EXPECT_EQ(1u, fetcherProcess->cacheFiles(slaveId, flags)->size());
+  ASSERT_SOME(fetcherProcess->cacheFiles());
+  EXPECT_EQ(1u, 

[06/16] mesos git commit: Changed the fetcher cache directory.

2017-05-25 Thread josephwu
Changed the fetcher cache directory.

The fetcher cache directory was historically located (by default)
in `/tmp/mesos/fetch`.  The agent flag `--fetcher_cache_dir` could
be used to change this value.

The fetcher would create a subdirectory underneath `/tmp/mesos/fetch`
for each `SlaveID`.  This was done because multiple agents can run on
the same node.  If all the agents use the same default fetcher cache
directory, they will collide and cause unpredictable results.
As a result, the `SlaveID` needed to be passed into the fetcher
after the agent recovers and/or registers with the master, because
that is when the `SlaveID` is determined.

This changes the default fetcher cache directory to
`/tmp/mesos/fetch`.  The `SlaveID` subdirectory has been removed.

This change, while techically a breaking change, is safe because of
how the fetcher uses this directory.  Upon starting up, the fetcher
"recovers" by clearing this directory.  Although the subdirectory
has been removed, the fetcher still clears the fetcher cache
on startup.

This change will only cause breakages if multiple agents are run
with the same `--fetcher_cache_dir`.  In this case, each agent
will delete the fetcher caches of all the other agents.

---

With the removal of the `SlaveID` field in the fetcher's methods,
it is no longer necessary to pass in the `SlaveID` or agent Flags
at agent recovery time.  Instead, the flags can be passed in during
the fetcher's construction.

Similarly, the fetcher's "recovery" (clearing the fetcher cache)
can be done immediately upon construction, which simplifies the
code slightly.

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


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

Branch: refs/heads/master
Commit: 145896bcf0dc0f2d53dd6836a99a0397e8ac13ae
Parents: 51da8c4
Author: Joseph Wu 
Authored: Mon Apr 10 18:24:15 2017 -0700
Committer: Joseph Wu 
Committed: Thu May 25 18:37:06 2017 -0700

--
 src/local/local.cpp |  6 ++-
 src/slave/containerizer/fetcher.cpp | 87 
 src/slave/containerizer/fetcher.hpp | 37 +-
 src/slave/flags.cpp | 17 +++
 src/slave/main.cpp  |  2 +-
 src/slave/slave.cpp | 15 --
 6 files changed, 48 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/145896bc/src/local/local.cpp
--
diff --git a/src/local/local.cpp b/src/local/local.cpp
index 3f4150b..ad35723 100644
--- a/src/local/local.cpp
+++ b/src/local/local.cpp
@@ -372,6 +372,10 @@ PID launch(const Flags& flags, Allocator* 
_allocator)
 propagatedFlags["runtime_dir"] =
   path::join(flags.runtime_dir, "agents", stringify(i));
 
+// Use a different fetcher cache directory for each agent.
+propagatedFlags["fetcher_cache_dir"] =
+  path::join(os::temp(), "mesos", "fetch", "agents", stringify(i));
+
 slave::Flags slaveFlags;
 Try load = slaveFlags.load(
 propagatedFlags,
@@ -407,7 +411,7 @@ PID launch(const Flags& flags, Allocator* 
_allocator)
 
 garbageCollectors->push_back(new GarbageCollector());
 statusUpdateManagers->push_back(new StatusUpdateManager(slaveFlags));
-fetchers->push_back(new Fetcher());
+fetchers->push_back(new Fetcher(slaveFlags));
 
 Try resourceEstimator =
   ResourceEstimator::create(slaveFlags.resource_estimator);

http://git-wip-us.apache.org/repos/asf/mesos/blob/145896bc/src/slave/containerizer/fetcher.cpp
--
diff --git a/src/slave/containerizer/fetcher.cpp 
b/src/slave/containerizer/fetcher.cpp
index a910fea..770cad3 100644
--- a/src/slave/containerizer/fetcher.cpp
+++ b/src/slave/containerizer/fetcher.cpp
@@ -36,8 +36,6 @@
 
 #include "hdfs/hdfs.hpp"
 
-#include "slave/slave.hpp"
-
 #include "slave/containerizer/fetcher.hpp"
 
 using std::list;
@@ -68,8 +66,15 @@ static const string FILE_URI_LOCALHOST = "file://localhost";
 static const string CACHE_FILE_NAME_PREFIX = "c";
 
 
-Fetcher::Fetcher() : process(new FetcherProcess())
+Fetcher::Fetcher(const Flags& flags) : process(new FetcherProcess(flags))
 {
+  if (os::exists(flags.fetcher_cache_dir)) {
+Try rmdir = os::rmdir(flags.fetcher_cache_dir, true);
+CHECK_SOME(rmdir)
+  << "Could not delete fetcher cache directory '"
+  << flags.fetcher_cache_dir << "': " + rmdir.error();
+  }
+
   spawn(process.get());
 }
 
@@ -88,34 +93,6 @@ Fetcher::~Fetcher()
 }
 
 
-Try Fetcher::recover(const SlaveID& slaveId, const 

[03/16] mesos git commit: Combined containerizer interface's launch methods.

2017-05-25 Thread josephwu
Combined containerizer interface's launch methods.

When nested container support was added, we added a separate `launch`
path in the containerizer because nested containers do not need
an explicit TaskInfo/ExecutorInfo.  Nested containers basically
only need the CommandInfo and ContainerInfo.

This commit combines the two launch methods by replacing most of the
"Infos" (Task, Executor, Command, Container) with a `ContainerConfig`
argument, which may contain multiple combinations of the "Infos".

The goal is to support three launch paths for containers:
  1) When the `ContainerConfig` contains a TaskInfo/ExecutorInfo,
 launch a task or executor.
  2) When the `ContainerID` has a parent, launch a nested container.
  3) (Not implemented yet) When there is no TaskInfo/ExecutorInfo or
 parent container, launch a standalone container.

There are two other notable changes to the interface:
  * The `SlaveID` field has been removed entirely.  The code that
requires this (in the fetcher and Docker containerizer) will be
addressed in a separate commit.
  * The `checkpoint` bool has been replaced by an Option,
which contains the path that should be used for checkpointing.
This path includes the filename.
This is also one of the reasons why `SlaveID` was an argument.

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


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

Branch: refs/heads/master
Commit: 0709ce3c7a3c09948e23761281ad9c5059484916
Parents: 7a8f864
Author: Joseph Wu 
Authored: Mon Apr 10 14:06:33 2017 -0700
Committer: Joseph Wu 
Committed: Thu May 25 18:37:06 2017 -0700

--
 src/slave/containerizer/containerizer.hpp | 36 --
 1 file changed, 11 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/0709ce3c/src/slave/containerizer/containerizer.hpp
--
diff --git a/src/slave/containerizer/containerizer.hpp 
b/src/slave/containerizer/containerizer.hpp
index f17e424..0954ed6 100644
--- a/src/slave/containerizer/containerizer.hpp
+++ b/src/slave/containerizer/containerizer.hpp
@@ -81,34 +81,20 @@ public:
   virtual process::Future recover(
   const Option& state) = 0;
 
-  // Launch a containerized task/executor. Returns true if launching
-  // this TaskInfo/ExecutorInfo is supported and it has been launched,
-  // otherwise false or a failure if something went wrong.
-  virtual process::Future launch(
-  const ContainerID& containerId,
-  const Option& taskInfo,
-  const ExecutorInfo& executorInfo,
-  const std::string& directory,
-  const Option& user,
-  const SlaveID& slaveId,
-  const std::map& environment,
-  bool checkpoint) = 0;
-
-  // Launch a nested container.
-  // TODO(jieyu): Consider combining with the 'launch' above.
+  // Launch a container with the specified ContainerConfig.
+  //
+  // If the ContainerID has a parent, this will attempt to launch
+  // a nested container.
+  // NOTE: For nested containers, the required `directory` field of
+  // the ContainerConfig will be determined by the containerizer.
   //
-  // TODO(gilbert): Remove the 'slaveId' once the fetcher does
-  // not rely on SlaveID.
+  // Returns true if launching this container is supported and it has
+  // been launched, otherwise false or a failure if something went wrong.
   virtual process::Future launch(
   const ContainerID& containerId,
-  const CommandInfo& commandInfo,
-  const Option& containerInfo,
-  const Option& user,
-  const SlaveID& slaveId,
-  const Option& containerClass = None())
-  {
-return process::Failure("Unsupported");
-  }
+  const mesos::slave::ContainerConfig& containerConfig,
+  const std::map& environment,
+  const Option& pidCheckpointPath) = 0;
 
   // Create an HTTP connection that can be used to "attach" (i.e.,
   // stream input to or stream output from) a container.



[08/16] mesos git commit: Updated test mocks per interface changes.

2017-05-25 Thread josephwu
Updated test mocks per interface changes.

This updates the mocks for the containerizers and fetcher after
the interface changes.  For the containerizers, the two launch methods
have been combined into a single method.

The fetcher now has an argument in its constructor and no longer
takes some arguments (SlaveID and Flags) in its methods.

Launching nested containers via the test containerizer was
originally a no-op, so similar behavior is implemented in the
combined method.

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


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

Branch: refs/heads/master
Commit: 46da722e72fa06133fd0a5130abc34a6edcbbf57
Parents: 66070eb
Author: Joseph Wu 
Authored: Mon May 1 13:59:32 2017 -0700
Committer: Joseph Wu 
Committed: Thu May 25 18:37:07 2017 -0700

--
 src/tests/cluster.cpp  |   2 +-
 src/tests/containerizer.cpp| 154 +---
 src/tests/containerizer.hpp|  36 +
 src/tests/containerizer/mock_containerizer.hpp |  20 +--
 src/tests/mesos.cpp|  19 +--
 src/tests/mesos.hpp|  18 +--
 src/tests/mock_docker.cpp  |   2 +-
 src/tests/mock_docker.hpp  |  42 ++
 8 files changed, 72 insertions(+), 221 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/46da722e/src/tests/cluster.cpp
--
diff --git a/src/tests/cluster.cpp b/src/tests/cluster.cpp
index a4f57e0..d657da6 100644
--- a/src/tests/cluster.cpp
+++ b/src/tests/cluster.cpp
@@ -413,7 +413,7 @@ Try Slave::start(
 slave->containerizer = containerizer.get();
   } else {
 // Create a new fetcher.
-slave->fetcher.reset(new slave::Fetcher());
+slave->fetcher.reset(new slave::Fetcher(flags));
 
 Try _containerizer =
   slave::Containerizer::create(flags, true, slave->fetcher.get());

http://git-wip-us.apache.org/repos/asf/mesos/blob/46da722e/src/tests/containerizer.cpp
--
diff --git a/src/tests/containerizer.cpp b/src/tests/containerizer.cpp
index 548da3a..1d2b639 100644
--- a/src/tests/containerizer.cpp
+++ b/src/tests/containerizer.cpp
@@ -37,6 +37,7 @@ using testing::Invoke;
 using testing::Return;
 
 using mesos::slave::ContainerClass;
+using mesos::slave::ContainerConfig;
 using mesos::slave::ContainerTermination;
 
 using mesos::v1::executor::Mesos;
@@ -87,35 +88,42 @@ public:
 
   Future launch(
   const ContainerID& containerId,
-  const Option& taskInfo,
-  const ExecutorInfo& executorInfo,
-  const string& directory,
-  const Option& user,
-  const SlaveID& slaveId,
+  const ContainerConfig& containerConfig,
   const map& environment,
-  bool checkpoint)
+  const Option& pidCheckpointPath)
   {
 CHECK(!terminatedContainers.contains(containerId))
   << "Failed to launch nested container " << containerId
-  << " for executor '" << executorInfo.executor_id() << "'"
-  << " of framework " << executorInfo.framework_id()
+  << " for executor '" << containerConfig.executor_info().executor_id()
+  << "' of framework " << containerConfig.executor_info().framework_id()
   << " because this ContainerID is being re-used with"
   << " a previously terminated container";
 
 CHECK(!containers_.contains(containerId))
   << "Failed to launch container " << containerId
-  << " for executor '" << executorInfo.executor_id() << "'"
-  << " of framework " << executorInfo.framework_id()
+  << " for executor '" << containerConfig.executor_info().executor_id()
+  << "' of framework " << containerConfig.executor_info().framework_id()
   << " because it is already launched";
 
-CHECK(executors.contains(executorInfo.executor_id()))
-  << "Failed to launch executor '" << executorInfo.executor_id() << "'"
-  << " of framework " << executorInfo.framework_id()
+containers_[containerId] = Owned(new ContainerData());
+
+if (containerId.has_parent()) {
+  // Launching a nested container via the test containerizer is a
+  // no-op for now.
+  return true;
+}
+
+CHECK(executors.contains(containerConfig.executor_info().executor_id()))
+  << "Failed to launch executor '"
+  << containerConfig.executor_info().executor_id()
+  << "' of framework " << containerConfig.executor_info().framework_id()
   << " because it is unknown to the 

[1/2] mesos git commit: Removed `const` in implicit conversion to `RepeatedPtrField`.

2017-05-25 Thread mpark
Repository: mesos
Updated Branches:
  refs/heads/master c4df8f7b0 -> 51da8c4bf


Removed `const` in implicit conversion to `RepeatedPtrField`.


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

Branch: refs/heads/master
Commit: 7c38f297f11b2462bea87f8a24758bd7d63c41dd
Parents: c4df8f7
Author: Michael Park 
Authored: Thu May 4 13:08:00 2017 -0700
Committer: Michael Park 
Committed: Thu May 25 18:25:28 2017 -0700

--
 include/mesos/resources.hpp| 2 +-
 include/mesos/v1/resources.hpp | 2 +-
 src/common/resources.cpp   | 2 +-
 src/v1/resources.cpp   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/7c38f297/include/mesos/resources.hpp
--
diff --git a/include/mesos/resources.hpp b/include/mesos/resources.hpp
index 74583e3..5d16a80 100644
--- a/include/mesos/resources.hpp
+++ b/include/mesos/resources.hpp
@@ -525,7 +525,7 @@ public:
   // a protocol buffer field.
   // Note that the google::protobuf::RepeatedPtrField is
   // generated at runtime.
-  operator const google::protobuf::RepeatedPtrField() const;
+  operator google::protobuf::RepeatedPtrField() const;
 
   bool operator==(const Resources& that) const;
   bool operator!=(const Resources& that) const;

http://git-wip-us.apache.org/repos/asf/mesos/blob/7c38f297/include/mesos/v1/resources.hpp
--
diff --git a/include/mesos/v1/resources.hpp b/include/mesos/v1/resources.hpp
index 132ef3e..e1c3577 100644
--- a/include/mesos/v1/resources.hpp
+++ b/include/mesos/v1/resources.hpp
@@ -525,7 +525,7 @@ public:
   // a protocol buffer field.
   // Note that the google::protobuf::RepeatedPtrField is
   // generated at runtime.
-  operator const google::protobuf::RepeatedPtrField() const;
+  operator google::protobuf::RepeatedPtrField() const;
 
   bool operator==(const Resources& that) const;
   bool operator!=(const Resources& that) const;

http://git-wip-us.apache.org/repos/asf/mesos/blob/7c38f297/src/common/resources.cpp
--
diff --git a/src/common/resources.cpp b/src/common/resources.cpp
index 1d07f1a..03e85ec 100644
--- a/src/common/resources.cpp
+++ b/src/common/resources.cpp
@@ -1695,7 +1695,7 @@ Option Resources::find(const Resource& target) 
const
 // Overloaded operators.
 /
 
-Resources::operator const RepeatedPtrField() const
+Resources::operator RepeatedPtrField() const
 {
   RepeatedPtrField all;
   foreach(const Resource& resource, resources) {

http://git-wip-us.apache.org/repos/asf/mesos/blob/7c38f297/src/v1/resources.cpp
--
diff --git a/src/v1/resources.cpp b/src/v1/resources.cpp
index 1bb5d07..46a63a0 100644
--- a/src/v1/resources.cpp
+++ b/src/v1/resources.cpp
@@ -1697,7 +1697,7 @@ Option Resources::find(const Resource& target) 
const
 // Overloaded operators.
 /
 
-Resources::operator const RepeatedPtrField() const
+Resources::operator RepeatedPtrField() const
 {
   RepeatedPtrField all;
   foreach(const Resource& resource, resources) {



[2/2] mesos git commit: Fixed minor Formatting.

2017-05-25 Thread mpark
Fixed minor Formatting.


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

Branch: refs/heads/master
Commit: 51da8c4bff865bd5aeaae6b23c2d02e7cc91b984
Parents: 7c38f29
Author: Michael Park 
Authored: Thu May 25 18:09:21 2017 -0700
Committer: Michael Park 
Committed: Thu May 25 18:25:35 2017 -0700

--
 src/common/resources.cpp | 4 ++--
 src/v1/resources.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/51da8c4b/src/common/resources.cpp
--
diff --git a/src/common/resources.cpp b/src/common/resources.cpp
index 03e85ec..97c00b2 100644
--- a/src/common/resources.cpp
+++ b/src/common/resources.cpp
@@ -623,7 +623,7 @@ Try Resources::parse(
   Resources result;
 
   // Validate individual Resource objects.
-  foreach(const Resource& resource, resources.get()) {
+  foreach (const Resource& resource, resources.get()) {
 // If invalid, propgate error instead of skipping the resource.
 Option error = Resources::validate(resource);
 if (error.isSome()) {
@@ -1698,7 +1698,7 @@ Option Resources::find(const Resource& target) 
const
 Resources::operator RepeatedPtrField() const
 {
   RepeatedPtrField all;
-  foreach(const Resource& resource, resources) {
+  foreach (const Resource& resource, resources) {
 all.Add()->CopyFrom(resource);
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/51da8c4b/src/v1/resources.cpp
--
diff --git a/src/v1/resources.cpp b/src/v1/resources.cpp
index 46a63a0..559b048 100644
--- a/src/v1/resources.cpp
+++ b/src/v1/resources.cpp
@@ -625,7 +625,7 @@ Try Resources::parse(
   Resources result;
 
   // Validate individual Resource objects.
-  foreach(const Resource& resource, resources.get()) {
+  foreach (const Resource& resource, resources.get()) {
 // If invalid, propgate error instead of skipping the resource.
 Option error = Resources::validate(resource);
 if (error.isSome()) {
@@ -1700,7 +1700,7 @@ Option Resources::find(const Resource& target) 
const
 Resources::operator RepeatedPtrField() const
 {
   RepeatedPtrField all;
-  foreach(const Resource& resource, resources) {
+  foreach (const Resource& resource, resources) {
 all.Add()->CopyFrom(resource);
   }
 



[4/4] mesos git commit: Windows: Enabled DOCKER and ROOT test filters.

2017-05-25 Thread josephwu
Windows: Enabled DOCKER and ROOT test filters.

This flips two test filters on Windows, so that all Docker and Root
tests are now enabled by default on Windows (rather than disabled).

On Windows, everything must be run as Administrator (like root, but
also somewhat different), so all ROOT tests are enabled by default.
The DOCKER filter now has the same behavior on Windows and Linux.

However, since many of the tests affected by these filters are
still not working on Windows, some individual tests have been
disabled.

The main test enabled by this commit is:
`DockerTest.ROOT_DOCKER_Version`.

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


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

Branch: refs/heads/master
Commit: c4df8f7b0e48e190111ef427080bf3ca5019a25a
Parents: 1724980
Author: John Kordich 
Authored: Thu May 25 17:24:10 2017 -0700
Committer: Joseph Wu 
Committed: Thu May 25 17:36:40 2017 -0700

--
 src/tests/CMakeLists.txt |  6 -
 src/tests/containerizer/docker_tests.cpp | 33 +++
 src/tests/default_executor_tests.cpp |  6 +++--
 src/tests/environment.cpp| 10 
 src/tests/health_check_tests.cpp | 16 -
 src/tests/hook_tests.cpp | 14 +++-
 src/tests/slave_tests.cpp|  5 ++--
 7 files changed, 54 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/CMakeLists.txt
--
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 29a46bd..ee56d2d 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -144,6 +144,11 @@ set(MESOS_TESTS_SRC
   common/type_utils_tests.cpp
   )
 
+set(MESOS_TESTS_SRC
+  ${MESOS_TESTS_SRC}
+  containerizer/docker_tests.cpp
+  )
+
 if (NOT WIN32)
   set(MESOS_TESTS_SRC
 ${MESOS_TESTS_SRC}
@@ -192,7 +197,6 @@ if (NOT WIN32)
 containerizer/cpu_isolator_tests.cpp
 containerizer/docker_containerizer_tests.cpp
 containerizer/docker_spec_tests.cpp
-containerizer/docker_tests.cpp
 containerizer/environment_secret_isolator_tests.cpp
 containerizer/io_switchboard_tests.cpp
 containerizer/isolator_tests.cpp

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4df8f7b/src/tests/containerizer/docker_tests.cpp
--
diff --git a/src/tests/containerizer/docker_tests.cpp 
b/src/tests/containerizer/docker_tests.cpp
index 3d3c9af..5cabf5a 100644
--- a/src/tests/containerizer/docker_tests.cpp
+++ b/src/tests/containerizer/docker_tests.cpp
@@ -98,7 +98,7 @@ protected:
 
 
 // This test tests the functionality of the docker's interfaces.
-TEST_F(DockerTest, ROOT_DOCKER_interface)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_interface)
 {
   const string containerName = NAME_PREFIX + "-test";
   Resources resources = Resources::parse("cpus:1;mem:512").get();
@@ -265,7 +265,7 @@ TEST_F(DockerTest, ROOT_DOCKER_interface)
 
 
 // This tests our 'docker kill' wrapper.
-TEST_F(DockerTest, ROOT_DOCKER_kill)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_kill)
 {
   const string containerName = NAME_PREFIX + "-test";
   Resources resources = Resources::parse("cpus:1;mem:512").get();
@@ -356,7 +356,7 @@ TEST_F(DockerTest, ROOT_DOCKER_Version)
 }
 
 
-TEST_F(DockerTest, ROOT_DOCKER_CheckCommandWithShell)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_CheckCommandWithShell)
 {
   Owned docker = Docker::create(
   tests::flags.docker,
@@ -384,7 +384,7 @@ TEST_F(DockerTest, ROOT_DOCKER_CheckCommandWithShell)
 }
 
 
-TEST_F(DockerTest, ROOT_DOCKER_CheckPortResource)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_CheckPortResource)
 {
   const string containerName = NAME_PREFIX + "-port-resource-test";
 
@@ -450,7 +450,7 @@ TEST_F(DockerTest, ROOT_DOCKER_CheckPortResource)
 }
 
 
-TEST_F(DockerTest, ROOT_DOCKER_CancelPull)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_CancelPull)
 {
   // Delete the test image if it exists.
 
@@ -486,7 +486,7 @@ TEST_F(DockerTest, ROOT_DOCKER_CancelPull)
 
 // This test verifies mounting in a relative host path when running a
 // docker container works.
-TEST_F(DockerTest, ROOT_DOCKER_MountRelativeHostPath)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(DockerTest, ROOT_DOCKER_MountRelativeHostPath)
 {
   Owned docker = Docker::create(
   tests::flags.docker,
@@ -531,7 +531,7 @@ TEST_F(DockerTest, ROOT_DOCKER_MountRelativeHostPath)
 
 // This test verifies mounting in an absolute host 

[1/4] mesos git commit: Windows: Bumped required CMake version to 3.8.0.

2017-05-25 Thread josephwu
Repository: mesos
Updated Branches:
  refs/heads/master 299f6aa0b -> c4df8f7b0


Windows: Bumped required CMake version to 3.8.0.

The 3.7.x series has a bug where it cannot find Visual Studio 2017
tools. See https://gitlab.kitware.com/cmake/cmake/issues/16732

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


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

Branch: refs/heads/master
Commit: d22bbb792f3674248d643a05a3780b31623008bd
Parents: 299f6aa
Author: Andrew Schwartzmeyer 
Authored: Thu May 25 13:29:12 2017 -0700
Committer: Joseph Wu 
Committed: Thu May 25 13:29:47 2017 -0700

--
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/d22bbb79/CMakeLists.txt
--
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ba6dd0..de463fb 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@
 if (NOT WIN32)
   cmake_minimum_required(VERSION 2.8.10)
 else (NOT WIN32)
-  cmake_minimum_required(VERSION 3.7.0)
+  cmake_minimum_required(VERSION 3.8.0)
 endif (NOT WIN32)
 
 project(Mesos)



[2/4] mesos git commit: Windows: Updated build documentation.

2017-05-25 Thread josephwu
Windows: Updated build documentation.

This (long overdue) documentation update bumps the dependencies
to the correct versions and updates the associated build commands.
Some of the limitations of the Windows work have also been addressed.

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


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

Branch: refs/heads/master
Commit: 171ba9449b6f3470bda77194e84acbe2d2d24cca
Parents: d22bbb7
Author: Andrew Schwartzmeyer 
Authored: Thu May 25 13:37:42 2017 -0700
Committer: Joseph Wu 
Committed: Thu May 25 14:18:42 2017 -0700

--
 docs/windows.md | 105 +++
 1 file changed, 56 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/171ba944/docs/windows.md
--
diff --git a/docs/windows.md b/docs/windows.md
index b070c64..d596158 100644
--- a/docs/windows.md
+++ b/docs/windows.md
@@ -13,77 +13,84 @@ Mesos 1.0.0 introduced experimental support for Windows.
 
 ### System Requirements
 
-1. Install the latest version of [Visual Studio Community 
2015](https://www.visualstudio.com/post-download-vs?sku=community).
-   Make sure to select the Common Tools for Visual C++ and the Windows 10 SDK.
-   Start Visual Studio Community to complete the setup and configuration.
-2. Install [CMake 3.6.3 or 
later](https://cmake.org/files/v3.6/cmake-3.6.3-win32-x86.msi).
-   Do not run CMake before finishing the Visual Studio Community setup.
-3. Install [Gnu Patch 2.5.9-7 or 
later](http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-setup.exe).
-4. If building from git, make sure you have Windows-style line endings.
-   i.e. `git config core.autocrlf true`.
-5. Make sure there are no spaces in your build directory.
+1. Install the latest [Visual Studio 
2017](https://www.visualstudio.com/downloads/):
+   The "Community" edition is sufficient (and free).
+   During installation, you install either the "Desktop development with C++"
+   workload or choose the following "Individual components":
+* VC++ 2017 v141 toolset
+* Windows 10 SDK (10.0.15036.0, currently) for Desktop C++
+* Windows Universal CRT SDK
+* Windows Universal C Runtime
+* C++ profiling tools (optional, for profiling)
+* Visual Studio C++ core features (optional, for IDE)
+
+2. Install [CMake 3.8.0](https://cmake.org/download/) or later.
+   During installation, choose to "Add CMake to the system PATH for all users".
+
+3. Install [GNU patch for 
Windows](http://gnuwin32.sourceforge.net/packages/patch.htm).
+
+4. If building from source, install [Git](https://git-scm.com/download/win).
+   During installation, keep the defaults to "Use Git from the Windows
+   Command Prompt", and "Checkout Windows-style, commit Unix-style
+   line endings" (i.e. `git config core.autocrlf true`).
+
+5. Enable filesystem long path support by running the following
+   in an administrative PowerShell prompt:
+   `Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem 
-Name LongPathsEnabled -Value 1`
+   And then reboot.  Alternatively this can be set manually through `regedit`.
+   For more details, see this
+   [MSDN 
article](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx).
+   NOTE: This requirement is in the process of being deprecated!
+
+6. Make sure there are no spaces in your build directory.
For example, `C:/Program Files (x86)/mesos` is an invalid build directory.
-6. **Optional**: Install [`python 
2.6+`](https://www.python.org/downloads/windows/) and 
[`virtualenv`](https://pypi.python.org/pypi/virtualenv)
-   This is only necessary when developing Mesos on Windows (specifically for 
automated linting of python files).
 
-### Build Instructions
-
-Following are the instructions for stock Windows 10 and Windows Server 2012 or 
newer.
+7. If developing Mesos, install [Python 2](https://www.python.org/downloads/)
+   (not Python 3), in order to use our support scripts (e.g. to post and apply
+   patches, or lint source code).
 
-# Start a VS2015 x64 Native Tool command prompt.
-# This can be found by opening VS2015 and looking under the "tools"
-# menu for "Visual Studio Command Prompt".
 
-# Change working directory.
-$ cd mesos
+### Build Instructions
 
-# If you are developing on Windows, we recommend running the bootstrap.
-# This requires administrator privileges.
-$ .\bootstrap.bat
+Following are the instructions for Windows 10.
 
-# Generate the solution and build.

mesos git commit: Removed two unused "using" statements.

2017-05-25 Thread neilc
Repository: mesos
Updated Branches:
  refs/heads/master 008607498 -> edde1da43


Removed two unused "using" statements.


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

Branch: refs/heads/master
Commit: edde1da43fed89e2f1950d2d5be70140e4485565
Parents: 0086074
Author: Neil Conway 
Authored: Thu May 25 10:17:01 2017 -0700
Committer: Neil Conway 
Committed: Thu May 25 10:17:01 2017 -0700

--
 src/tests/persistent_volume_endpoints_tests.cpp | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/edde1da4/src/tests/persistent_volume_endpoints_tests.cpp
--
diff --git a/src/tests/persistent_volume_endpoints_tests.cpp 
b/src/tests/persistent_volume_endpoints_tests.cpp
index 8c54372..21136b2 100644
--- a/src/tests/persistent_volume_endpoints_tests.cpp
+++ b/src/tests/persistent_volume_endpoints_tests.cpp
@@ -46,8 +46,6 @@ using std::vector;
 
 using google::protobuf::RepeatedPtrField;
 
-using mesos::internal::master::DEFAULT_ALLOCATION_INTERVAL;
-using mesos::internal::master::Master;
 using mesos::internal::slave::Slave;
 
 using mesos::master::detector::MasterDetector;



[2/3] mesos git commit: Replaced `.get().` with `->` in the agent.

2017-05-25 Thread neilc
Replaced `.get().` with `->` in the agent.

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


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

Branch: refs/heads/master
Commit: 4a5ec22a7a32ea1761afbd4b5abc0005df772006
Parents: b048934
Author: Neil Conway 
Authored: Thu May 25 10:01:56 2017 -0700
Committer: Neil Conway 
Committed: Thu May 25 10:02:55 2017 -0700

--
 src/slave/flags.cpp |  2 +-
 src/slave/http.cpp  |  7 ++--
 src/slave/main.cpp  |  4 +--
 src/slave/slave.cpp | 62 
 src/slave/state.cpp | 20 +--
 src/slave/status_update_manager.cpp | 10 +++---
 6 files changed, 52 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/4a5ec22a/src/slave/flags.cpp
--
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index 0c8276e..d0dc9c8 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -315,7 +315,7 @@ mesos::internal::slave::Flags::Flags()
   "}",
   [](const Option& object) -> Option {
 if (object.isSome()) {
-  foreachvalue (const JSON::Value& value, object.get().values) {
+  foreachvalue (const JSON::Value& value, object->values) {
 if (!value.is()) {
   return Error("`executor_environment_variables` must "
"only contain string values");

http://git-wip-us.apache.org/repos/asf/mesos/blob/4a5ec22a/src/slave/http.cpp
--
diff --git a/src/slave/http.cpp b/src/slave/http.cpp
index 5beaf91..a38 100644
--- a/src/slave/http.cpp
+++ b/src/slave/http.cpp
@@ -412,7 +412,7 @@ Future Slave::Http::api(
 
 Option error = validation::agent::call::validate(call);
 if (error.isSome()) {
-  return Error("Failed to validate agent::Call: " + error.get().message);
+  return Error("Failed to validate agent::Call: " + error->message);
 }
 
 return call;
@@ -705,8 +705,7 @@ Future Slave::Http::executor(
   Option error = validation::executor::call::validate(call);
 
   if (error.isSome()) {
-return BadRequest("Failed to validate Executor::Call: " +
-  error.get().message);
+return BadRequest("Failed to validate Executor::Call: " + error->message);
   }
 
   ContentType acceptType;
@@ -1312,7 +1311,7 @@ Future Slave::Http::state(
 
 if (slave->master.isSome()) {
   Try hostname =
-net::getHostname(slave->master.get().address.ip);
+net::getHostname(slave->master->address.ip);
 
   if (hostname.isSome()) {
 writer->field("master_hostname", hostname.get());

http://git-wip-us.apache.org/repos/asf/mesos/blob/4a5ec22a/src/slave/main.cpp
--
diff --git a/src/slave/main.cpp b/src/slave/main.cpp
index 947f1f2..a363ae6 100644
--- a/src/slave/main.cpp
+++ b/src/slave/main.cpp
@@ -184,7 +184,7 @@ static Try assignCgroups(const slave::Flags& flags)
 // isolators/cgroups/perf.cpp. Consider moving ancillary
 // processes to a different cgroup, e.g., moving 'docker log' to
 // the container's cgroup.
-if (!processes.get().empty()) {
+if (!processes->empty()) {
   // For each process, we print its pid as well as its command
   // to help triaging.
   vector infos;
@@ -193,7 +193,7 @@ static Try assignCgroups(const slave::Flags& flags)
 
 // Only print the command if available.
 if (proc.isSome()) {
-  infos.push_back(stringify(pid) + " '" + proc.get().command + "'");
+  infos.push_back(stringify(pid) + " '" + proc->command + "'");
 } else {
   infos.push_back(stringify(pid));
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/4a5ec22a/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 15e4d68..dbc1c4b 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -256,7 +256,7 @@ void Slave::initialize()
 } else {
   credential = _credential.get();
   LOG(INFO) << "Agent using credential for: "
-<< credential.get().principal();
+<< credential->principal();
 }
   }
 
@@ -458,7 +458,7 @@ void Slave::initialize()
 }
 
 bool foundEntry = false;
-foreach (const fs::MountTable::Entry& entry, mountTable.get().entries) 
{
+foreach (const 

[3/3] mesos git commit: Replaced "!(x == y)" with "x != y" when comparing SlaveIDs.

2017-05-25 Thread neilc
Replaced "!(x == y)" with "x != y" when comparing SlaveIDs.

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


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

Branch: refs/heads/master
Commit: 008607498d529a1b2dccaf37eb18ddd953470bee
Parents: 4a5ec22
Author: Neil Conway 
Authored: Thu May 25 10:01:59 2017 -0700
Committer: Neil Conway 
Committed: Thu May 25 10:03:01 2017 -0700

--
 src/master/master.cpp | 2 +-
 src/slave/slave.cpp   | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/00860749/src/master/master.cpp
--
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 52544fb..14007e0 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -5060,7 +5060,7 @@ void Master::kill(Framework* framework, const 
scheduler::Call::Kill& kill)
 return;
   }
 
-  if (slaveId.isSome() && !(slaveId.get() == task->slave_id())) {
+  if (slaveId.isSome() && slaveId.get() != task->slave_id()) {
 LOG(WARNING) << "Cannot kill task " << taskId << " of agent "
  << slaveId.get() << " of framework " << *framework
  << " because it belongs to different agent "

http://git-wip-us.apache.org/repos/asf/mesos/blob/00860749/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index dbc1c4b..b7e731b 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1169,7 +1169,7 @@ void Slave::registered(
 }
 case RUNNING:
   // Already registered!
-  if (!(info.id() == slaveId)) {
+  if (info.id() != slaveId) {
EXIT(EXIT_FAILURE)
  << "Registered but got wrong id: " << slaveId
  << " (expected: " << info.id() << "). Committing suicide";
@@ -1216,7 +1216,7 @@ void Slave::reregistered(
 
   CHECK_SOME(master);
 
-  if (!(info.id() == slaveId)) {
+  if (info.id() != slaveId) {
 EXIT(EXIT_FAILURE)
   << "Re-registered but got wrong id: " << slaveId
   << " (expected: " << info.id() << "). Committing suicide";
@@ -1618,7 +1618,7 @@ void Slave::run(
 << " for framework " << frameworkId;
 
   foreach (const TaskInfo& _task, tasks) {
-if (!(_task.slave_id() == info.id())) {
+if (_task.slave_id() != info.id()) {
   LOG(WARNING)
 << "Agent " << info.id() << " ignoring running "
 << taskOrTaskGroup(_task, taskGroup) << " because "
@@ -6005,7 +6005,7 @@ void Slave::__recover(const Future& future)
   // registers with the master) or if it is an old work directory.
   SlaveID slaveId;
   slaveId.set_value(entry);
-  if (!info.has_id() || !(slaveId == info.id())) {
+  if (!info.has_id() || slaveId != info.id()) {
 LOG(INFO) << "Garbage collecting old agent " << slaveId;
 
 // NOTE: We update the modification time of the slave work/meta



svn commit: r19791 - in /dev/mesos/1.3.0-rc3: ./ mesos-1.3.0.tar.gz mesos-1.3.0.tar.gz.asc mesos-1.3.0.tar.gz.md5

2017-05-25 Thread mpark
Author: mpark
Date: Thu May 25 09:15:57 2017
New Revision: 19791

Log:
Adding mesos-1.3.0-rc3.

Added:
dev/mesos/1.3.0-rc3/
dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz   (with props)
dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.asc
dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.md5

Added: dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz
==
Binary file - no diff available.

Propchange: dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.asc
==
--- dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.asc (added)
+++ dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.asc Thu May 25 09:15:57 2017
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+Version: GnuPG v2.0.22 (GNU/Linux)
+
+iQEcBAABAgAGBQJZJqCrAAoJEO+gv9pSG5n9BZgH/0R0Q5WhWrcXwJmKUAclkGpy
+P04owEY18fkKAwf3CpwnTP2GlJd1UMhbmEiSADTUX6yD+9zbxdrouRVdMOYPJUhJ
+BoDc/X7UzWnWIlfnPrCRwCJlypzFqmlANZRN8h7bQ84FRto+7ZP5/BgHwQlZzz/o
+J/8UNbh6XOqCmsF4VoIpah3pAvSUNF2B/htTg0YxgSJSIcHkMEH5Zy9eUonFUX2r
+4P298av73K7C8BtNG2VxeCH2prY4qDDEX0hGc4RZeOMFVeNHsGkXRhbbj4prQxi3
+NvxaHjHOs63FUBuRnv5/lTqVjmrH8MNE2fzEXZGcljkkQB2tXl93UNgyOkg+xxc=
+=uor9
+-END PGP SIGNATURE-

Added: dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.md5
==
--- dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.md5 (added)
+++ dev/mesos/1.3.0-rc3/mesos-1.3.0.tar.gz.md5 Thu May 25 09:15:57 2017
@@ -0,0 +1 @@
+mesos-1.3.0.tar.gz: 18 66 7D ED 1C 55 E4 D6  6B 52 41 88 DA 2D CC F3




[mesos] Git Push Summary

2017-05-25 Thread mpark
Repository: mesos
Updated Tags:  refs/tags/1.3.0-rc3 [created] 904729ed3