You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/10/28 21:00:48 UTC
[1/2] mesos git commit: Fixed duplicate framework ids in
"unregistered_frameworks".
Repository: mesos
Updated Branches:
refs/heads/1.0.x 43019066c -> d073ed53b
Fixed duplicate framework ids in "unregistered_frameworks".
The existing test (MasterTest.OrphanTasks) continues to pass after
the change. I will try to write another test that spawns multiple
agents to ensure the duplicate framework ids are not shown.
Review: https://reviews.apache.org/r/53159
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/81f9c697
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/81f9c697
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/81f9c697
Branch: refs/heads/1.0.x
Commit: 81f9c6977f0d7706ef4e454b4e06da024076e82c
Parents: 4301906
Author: Vinod Kone <vi...@gmail.com>
Authored: Mon Oct 24 17:05:12 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Oct 28 13:58:30 2016 -0700
----------------------------------------------------------------------
src/master/http.cpp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/81f9c697/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 810cf48..50d8e3a 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -1339,13 +1339,18 @@ Future<Response> Master::Http::frameworks(
// Model all currently unregistered frameworks. This can happen
// when a framework has yet to re-register after master failover.
+ // TODO(vinod): Need to filter these frameworks based on authorization!
+ // See TODO in `state()` for further details.
writer->field("unregistered_frameworks", [this](
JSON::ArrayWriter* writer) {
// Find unregistered frameworks.
+ hashset<FrameworkID> frameworkIds;
foreachvalue (const Slave* slave, master->slaves.registered) {
foreachkey (const FrameworkID& frameworkId, slave->tasks) {
- if (!master->frameworks.registered.contains(frameworkId)) {
+ if (!master->frameworks.registered.contains(frameworkId) &&
+ !frameworkIds.contains(frameworkId)) {
writer->element(frameworkId.value());
+ frameworkIds.insert(frameworkId);
}
}
}
@@ -2757,10 +2762,13 @@ Future<Response> Master::Http::state(
writer->field("unregistered_frameworks", [this](
JSON::ArrayWriter* writer) {
// Find unregistered frameworks.
+ hashset<FrameworkID> frameworkIds;
foreachvalue (const Slave* slave, master->slaves.registered) {
foreachkey (const FrameworkID& frameworkId, slave->tasks) {
- if (!master->frameworks.registered.contains(frameworkId)) {
+ if (!master->frameworks.registered.contains(frameworkId) &&
+ !frameworkIds.contains(frameworkId)) {
writer->element(frameworkId.value());
+ frameworkIds.insert(frameworkId);
}
}
}
[2/2] mesos git commit: Added MESOS-4973 and MESOS-6461 to 1.0.2
CHANGELOG.
Posted by vi...@apache.org.
Added MESOS-4973 and MESOS-6461 to 1.0.2 CHANGELOG.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d073ed53
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d073ed53
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d073ed53
Branch: refs/heads/1.0.x
Commit: d073ed53b62b978385b4df2b63df32711f41de99
Parents: 81f9c69
Author: Vinod Kone <vi...@gmail.com>
Authored: Fri Oct 28 13:56:50 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Oct 28 14:00:02 2016 -0700
----------------------------------------------------------------------
CHANGELOG | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d073ed53/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index bf2c8bf..753e3c0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@ Release Notes - Mesos - Version 1.0.2
All Issues:
** Bug
+ * [MESOS-4973] - Duplicates in 'unregistered_frameworks' in /state
* [MESOS-4975] - mesos::internal::master::Slave::tasks can grow unboundedly.
* [MESOS-5613] - mesos-local fails to start if MESOS_WORK_DIR isn't set.
* [MESOS-6013] - Use readdir instead of readdir_r.
@@ -25,8 +26,9 @@ All Issues:
* [MESOS-6324] - CNI should not use `ifconfig` in executors `pre_exec_command`
* [MESOS-6391] - Command task's sandbox should not be owned by root if it uses container image.
* [MESOS-6393] - Deprecated SSL_ environment variables are non functional already.
- * [MESOS-6420] - Mesos Agent leaking sockets when port mapping network isolator is ON
- * [MESOS-6446] - WebUI redirect doesn't work with stats from /metric/snapshot
+ * [MESOS-6420] - Mesos Agent leaking sockets when port mapping network isolator is ON.
+ * [MESOS-6446] - WebUI redirect doesn't work with stats from /metric/snapshot.
+ * [MESOS-6461] - Duplicate framework ids in /master/frameworks endpoint 'unregistered_frameworks'.
** Improvement
* [MESOS-6075] - Avoid libprocess functions in `mesos-containerizer launch`.