You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2018/07/02 04:05:17 UTC
mesos git commit: Removed the isolators ordering check from
`gpu/nvidia` isolator.
Repository: mesos
Updated Branches:
refs/heads/master 77aba9a27 -> e811f960d
Removed the isolators ordering check from `gpu/nvidia` isolator.
We do not need to check the isolators ordering because we have made
the order of built-in isolators fixed in MESOS-7643.
Review: https://reviews.apache.org/r/67767/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e811f960
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e811f960
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e811f960
Branch: refs/heads/master
Commit: e811f960dc134c1d74dd23f0bf48b54b5106f198
Parents: 77aba9a
Author: Qian Zhang <zh...@gmail.com>
Authored: Sun Jul 1 21:04:59 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Sun Jul 1 21:04:59 2018 -0700
----------------------------------------------------------------------
.../mesos/isolators/gpu/isolator.cpp | 27 +++++---------------
1 file changed, 6 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e811f960/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp b/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
index 5066882..d84f78c 100644
--- a/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
+++ b/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
@@ -102,8 +102,8 @@ Try<Isolator*> NvidiaGpuIsolatorProcess::create(
const Flags& flags,
const NvidiaComponents& components)
{
- // Make sure both the 'cgroups/devices' (or 'cgroups/all') isolator and the
- // 'filesystem/linux' isolators are present and precede the GPU isolator.
+ // Make sure both the 'cgroups/devices' (or 'cgroups/all')
+ // and the 'filesystem/linux' isolators are present.
vector<string> tokens = strings::tokenize(flags.isolation, ",");
auto gpuIsolator =
@@ -135,15 +135,10 @@ Try<Isolator*> NvidiaGpuIsolatorProcess::create(
return Error(
"The `devices` cgroups subsystem is not enabled by the kernel");
}
-
- if (devicesIsolator > cgroupsAllIsolator) {
- devicesIsolator = cgroupsAllIsolator;
- }
- }
-
- if (devicesIsolator == tokens.end()) {
- return Error("The 'cgroups/devices' isolator must be enabled in"
- " order to use the 'gpu/nvidia' isolator");
+ } else if (devicesIsolator == tokens.end()) {
+ return Error(
+ "The 'cgroups/devices' or 'cgroups/all' isolator must be"
+ " enabled in order to use the 'gpu/nvidia' isolator");
}
if (filesystemIsolator == tokens.end()) {
@@ -151,16 +146,6 @@ Try<Isolator*> NvidiaGpuIsolatorProcess::create(
" order to use the 'gpu/nvidia' isolator");
}
- if (devicesIsolator > gpuIsolator) {
- return Error("'cgroups/devices' or 'cgroups/all' must precede 'gpu/nvidia'"
- " in the --isolation flag");
- }
-
- if (filesystemIsolator > gpuIsolator) {
- return Error("'filesystem/linux' must precede 'gpu/nvidia'"
- " in the --isolation flag");
- }
-
// Retrieve the cgroups devices hierarchy.
Result<string> hierarchy = cgroups::hierarchy(CGROUP_SUBSYSTEM_DEVICES_NAME);