You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/05/09 21:18:43 UTC
[1/2] mesos git commit: Fixed the MULTI_ROLE upgrade path for an old
master and new agent.
Repository: mesos
Updated Branches:
refs/heads/1.3.x e32a263c3 -> 95ec15322
Fixed the MULTI_ROLE upgrade path for an old master and new agent.
The agent was accidentally assuming that the task sent by the master
had the `allocation_info` set. The fix is for `getExecutorInfo` to
inject only in the case where it is already set.
Review: https://reviews.apache.org/r/59078
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/24622f16
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/24622f16
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/24622f16
Branch: refs/heads/1.3.x
Commit: 24622f16ed905cfc07b6d3820dde99835121c0d7
Parents: e32a263
Author: Benjamin Mahler <bm...@apache.org>
Authored: Mon May 8 18:13:25 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue May 9 14:11:34 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/24622f16/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 8b8078d..1892326 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4994,21 +4994,28 @@ ExecutorInfo Slave::getExecutorInfo(
"cpus:" + stringify(DEFAULT_EXECUTOR_CPUS) + ";" +
"mem:" + stringify(DEFAULT_EXECUTOR_MEM.megabytes())).get();
- // Inject the task's allocation role into the executor's resources.
+ // If the task has an allocation role, we inject it into
+ // the executor as well. Note that old masters will not
+ // ensure the allocation info is set, and the agent will
+ // inject this later, when storing the task/executor.
Option<string> role = None();
foreach (const Resource& resource, task.resources()) {
- CHECK(resource.has_allocation_info());
-
- if (role.isNone()) {
+ if (role.isNone() && resource.has_allocation_info()) {
role = resource.allocation_info().role();
}
- CHECK_EQ(role.get(), resource.allocation_info().role());
- }
+ // Check that the roles are consistent.
+ Option<string> otherRole = resource.has_allocation_info()
+ ? Option<string>(resource.allocation_info().role()) : None();
- CHECK_SOME(role);
+ CHECK(role == otherRole)
+ << (role.isSome() ? role.get() : "None")
+ << " vs " << (otherRole.isSome() ? otherRole.get() : "None");
+ }
- executorOverhead.allocate(role.get());
+ if (role.isSome()) {
+ executorOverhead.allocate(role.get());
+ }
executor.mutable_resources()->CopyFrom(executorOverhead);
[2/2] mesos git commit: Added MESOS-7478 to the 1.3.0 CHANGELOG.
Posted by bm...@apache.org.
Added MESOS-7478 to the 1.3.0 CHANGELOG.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/95ec1532
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/95ec1532
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/95ec1532
Branch: refs/heads/1.3.x
Commit: 95ec153225927f4e764b8120e797901ac98336ba
Parents: 24622f1
Author: Benjamin Mahler <bm...@apache.org>
Authored: Tue May 9 14:15:25 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue May 9 14:18:29 2017 -0700
----------------------------------------------------------------------
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/95ec1532/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 34e85cc..2656d01 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -198,6 +198,7 @@ All Resolved Issues:
* [MESOS-7430] - Per-role Suppress call implementation is broken.
* [MESOS-7453] - glyphicons-halflings-regular.woff2 is missing in WebUI.
* [MESOS-7456] - Compilation error on recent glibc in cgroups device subsystem.
+ * [MESOS-7478] - Pre-1.2.x master does not work with 1.2.x agent.
** Documentation
* [MESOS-7005] - Add executor authentication documentation.