[mesos] branch 1.9.x updated: Fixed a bug where sorter may leak clients.
This is an automated email from the ASF dual-hosted git repository. mzhu pushed a commit to branch 1.9.x in repository https://gitbox.apache.org/repos/asf/mesos.git The following commit(s) were added to refs/heads/1.9.x by this push: new 27e3e8f Fixed a bug where sorter may leak clients. 27e3e8f is described below commit 27e3e8ff1cf0f0b9201a71a6853a1a1da44cb633 Author: Meng Zhu AuthorDate: Wed Sep 18 16:45:46 2019 -0700 Fixed a bug where sorter may leak clients. It is possible to update allocations to empty in the sorter. See MESOS-9015. When this happens, sorter will leak client entries, since it does not erase the corresponding entries. This patch fixes this issue. Also added a regression test. Review: https://reviews.apache.org/r/71515 --- src/master/allocator/mesos/sorter/drf/sorter.hpp| 8 +++- src/master/allocator/mesos/sorter/random/sorter.hpp | 8 +++- src/tests/sorter_tests.cpp | 16 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/master/allocator/mesos/sorter/drf/sorter.hpp b/src/master/allocator/mesos/sorter/drf/sorter.hpp index f157ec6..299985c 100644 --- a/src/master/allocator/mesos/sorter/drf/sorter.hpp +++ b/src/master/allocator/mesos/sorter/drf/sorter.hpp @@ -359,7 +359,7 @@ struct DRFSorter::Node totals -= quantitiesToRemove; - if (resources[slaveId].empty()) { + if (resources.at(slaveId).empty()) { resources.erase(slaveId); } } @@ -385,6 +385,12 @@ struct DRFSorter::Node resources[slaveId] -= oldAllocation; resources[slaveId] += newAllocation; + // It is possible that allocations can be updated to empty. + // See MESOS-9015 and MESOS-9975. + if (resources.at(slaveId).empty()) { +resources.erase(slaveId); + } + totals -= oldAllocationQuantities; totals += newAllocationQuantities; } diff --git a/src/master/allocator/mesos/sorter/random/sorter.hpp b/src/master/allocator/mesos/sorter/random/sorter.hpp index 8663ccd..b77c5cc 100644 --- a/src/master/allocator/mesos/sorter/random/sorter.hpp +++ b/src/master/allocator/mesos/sorter/random/sorter.hpp @@ -379,7 +379,7 @@ struct RandomSorter::Node totals -= quantitiesToRemove; - if (resources[slaveId].empty()) { + if (resources.at(slaveId).empty()) { resources.erase(slaveId); } } @@ -405,6 +405,12 @@ struct RandomSorter::Node resources[slaveId] -= oldAllocation; resources[slaveId] += newAllocation; + // It is possible that allocations can be updated to empty. + // See MESOS-9015 and MESOS-9975. + if (resources.at(slaveId).empty()) { +resources.erase(slaveId); + } + totals -= oldAllocationQuantities; totals += newAllocationQuantities; } diff --git a/src/tests/sorter_tests.cpp b/src/tests/sorter_tests.cpp index 97ab910..78d6dde 100644 --- a/src/tests/sorter_tests.cpp +++ b/src/tests/sorter_tests.cpp @@ -1230,6 +1230,22 @@ TYPED_TEST(CommonSorterTest, UpdateAllocation) EXPECT_EQ( CHECK_NOTERROR(ResourceQuantities::fromString("cpus:10;mem:10;disk:10")), sorter.allocationScalarQuantities()); + + // Test update allocation to empty. + Resources resourcesC = +CHECK_NOTERROR(Resources::parse("cpus:10;mem:10;disk:10")); + + SlaveID slaveId2; + slaveId.set_value("agentId2"); + + sorter.add("c"); + sorter.activate("c"); + + sorter.add(slaveId, resourcesC); + + sorter.allocated("c", slaveId2, resourcesC); + sorter.update("c", slaveId2, resourcesC, Resources()); + EXPECT_TRUE(sorter.allocation("c").empty()); }
[mesos] branch master updated: Fixed Javascript linting and IE compatibility of the UI roles tree.
This is an automated email from the ASF dual-hosted git repository. mzhu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git The following commit(s) were added to refs/heads/master by this push: new aed0b87 Fixed Javascript linting and IE compatibility of the UI roles tree. aed0b87 is described below commit aed0b871479ecb1ee36df334c46203b75d682a7e Author: Andrei Sekretenko AuthorDate: Wed Sep 25 13:11:08 2019 -0700 Fixed Javascript linting and IE compatibility of the UI roles tree. Review: https://reviews.apache.org/r/71541/ --- src/webui/app/app.js | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/webui/app/app.js b/src/webui/app/app.js index 24fab09..3456050 100644 --- a/src/webui/app/app.js +++ b/src/webui/app/app.js @@ -277,11 +277,11 @@ function buildTree(roles) { var root = {}; -for (var path of roles) { - const tokens = path.split('/'); +for (var roleIndex = 0; roleIndex < roles.length; roleIndex += 1) { + var tokens = roles[roleIndex].split('/'); var i = 0; var node = root; - for (i = 0; i < tokens.length && (tokens[i] in node); ++i) { + for (i = 0; i < tokens.length && (tokens[i] in node); i += 1) { node = node[tokens[i]]; } @@ -289,24 +289,25 @@ node['.'] = {}; } - for (; i < tokens.length; ++i) { + for (; i < tokens.length; i += 1) { node[tokens[i]] = {}; node = node[tokens[i]]; } } return root; - }; + } function prepareTree(path, name, node) { -const prefix = path ? path + '/' : ''; +var prefix = path ? path + '/' : ''; return { - "children": Object.keys(node).sort().map( - k => prepareTree(prefix + k, k, node[k])), + "children": Object.keys(node).sort().map(function(k) { + return prepareTree(prefix + k, k, node[k]); +}), "name": name, "path": path } - }; + } return { restrict: 'E',
[mesos-site] branch asf-site updated: Updated the website built from mesos SHA: 7b1d12267.
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/mesos-site.git The following commit(s) were added to refs/heads/asf-site by this push: new 725b992 Updated the website built from mesos SHA: 7b1d12267. 725b992 is described below commit 725b992c644af867c0b2e85a2ac97accdfc1d15c Author: jenkins AuthorDate: Wed Sep 25 15:28:21 2019 + Updated the website built from mesos SHA: 7b1d12267. --- content/documentation/latest/release-guide/index.html | 3 +++ content/documentation/release-guide/index.html| 3 +++ 2 files changed, 6 insertions(+) diff --git a/content/documentation/latest/release-guide/index.html b/content/documentation/latest/release-guide/index.html index 9498e0a..1e936dc 100644 --- a/content/documentation/latest/release-guide/index.html +++ b/content/documentation/latest/release-guide/index.html @@ -359,6 +359,9 @@ two tags: Mention the blog post in site/data/releases.yml. +Post a tweet from the https://twitter.com/apachemesos account, please contact +the PMC if you need the account password (or want someone to post the tweet on +your behalf). diff --git a/content/documentation/release-guide/index.html b/content/documentation/release-guide/index.html index 8857b6c..fcfab20 100644 --- a/content/documentation/release-guide/index.html +++ b/content/documentation/release-guide/index.html @@ -359,6 +359,9 @@ two tags: Mention the blog post in site/data/releases.yml. +Post a tweet from the https://twitter.com/apachemesos account, please contact +the PMC if you need the account password (or want someone to post the tweet on +your behalf).
[mesos] branch master updated: Added @ApacheMesos release tweet to the release guide.
This is an automated email from the ASF dual-hosted git repository. bmahler pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git The following commit(s) were added to refs/heads/master by this push: new 7b1d122 Added @ApacheMesos release tweet to the release guide. 7b1d122 is described below commit 7b1d12267dec7f492c285641b8f25b8e7bd62e17 Author: bmahler AuthorDate: Wed Sep 25 10:57:26 2019 -0400 Added @ApacheMesos release tweet to the release guide. We forgot to tweet the 1.8.0 and 1.9.0 releases, so this adds it to the release guide. --- docs/release-guide.md | 4 1 file changed, 4 insertions(+) diff --git a/docs/release-guide.md b/docs/release-guide.md index 84e9f85..49e1e74 100644 --- a/docs/release-guide.md +++ b/docs/release-guide.md @@ -254,6 +254,10 @@ This guide describes the process of doing an official release of Mesos. * Mention the blog post in `site/data/releases.yml`. +5. Post a tweet from the https://twitter.com/apachemesos account, please contact + the PMC if you need the account password (or want someone to post the tweet on + your behalf). + ## Removing Old Releases from svn
[mesos] branch master updated: Fixed broken links to Linux scheduler documentation.
This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git The following commit(s) were added to refs/heads/master by this push: new afd86db Fixed broken links to Linux scheduler documentation. afd86db is described below commit afd86db2ef651b33188586a5cafe3e532439534d Author: Andrei Budnik AuthorDate: Wed Sep 25 13:55:15 2019 +0200 Fixed broken links to Linux scheduler documentation. --- docs/isolators/cgroups-cpu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/isolators/cgroups-cpu.md b/docs/isolators/cgroups-cpu.md index 5392132..6c08b1d 100644 --- a/docs/isolators/cgroups-cpu.md +++ b/docs/isolators/cgroups-cpu.md @@ -17,8 +17,8 @@ and assigns `cpu` and `cpuacct` cgroups to each container launched by Mesos Containerizer. Cgroups `cpu` subsystem provides 2 mechanisms of limiting the amount -of CPU time used by cgroups: [CFS shares](https://github.com/torvalds/linux/blob/master/Documentation/scheduler/sched-design-CFS.txt) -and [CFS bandwidth](https://github.com/torvalds/linux/blob/master/Documentation/scheduler/sched-bwc.txt) +of CPU time used by cgroups: [CFS shares](https://github.com/torvalds/linux/blob/master/Documentation/scheduler/sched-design-CFS.rst) +and [CFS bandwidth](https://github.com/torvalds/linux/blob/master/Documentation/scheduler/sched-bwc.rst) control. The first one can guarantee some minimum number of CPU "shares" to a cgroup when the system is under heavy load. It, however, does not limit the amount of CPU time available to a cgroup when the