You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2017/05/23 07:44:30 UTC
[4/4] mesos git commit: Stop storing agent flags in the XFS disk
isolator.
Stop storing agent flags in the XFS disk isolator.
Review: https://reviews.apache.org/r/55896/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bb048eca
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bb048eca
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bb048eca
Branch: refs/heads/master
Commit: bb048ecabf30abd56a091ce54fa8abad1651ad62
Parents: 5d4faaa
Author: James Peach <jp...@apache.org>
Authored: Tue May 23 00:33:11 2017 -0700
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Tue May 23 00:44:23 2017 -0700
----------------------------------------------------------------------
src/slave/containerizer/mesos/isolators/xfs/disk.cpp | 8 ++++----
src/slave/containerizer/mesos/isolators/xfs/disk.hpp | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/bb048eca/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/xfs/disk.cpp b/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
index 40f1049..72bef87 100644
--- a/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
+++ b/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
@@ -157,15 +157,15 @@ Try<Isolator*> XfsDiskIsolatorProcess::create(const Flags& flags)
}
return new MesosIsolator(Owned<MesosIsolatorProcess>(
- new XfsDiskIsolatorProcess(flags, totalProjectIds.get())));
+ new XfsDiskIsolatorProcess(flags.work_dir, totalProjectIds.get())));
}
XfsDiskIsolatorProcess::XfsDiskIsolatorProcess(
- const Flags& _flags,
+ const std::string& _workDir,
const IntervalSet<prid_t>& projectIds)
: ProcessBase(process::ID::generate("xfs-disk-isolator")),
- flags(_flags),
+ workDir(_workDir),
totalProjectIds(projectIds),
freeProjectIds(projectIds)
{
@@ -188,7 +188,7 @@ Future<Nothing> XfsDiskIsolatorProcess::recover(
// for project IDs that we have not recovered and make a best effort to
// remove all the corresponding on-disk state.
Try<list<string>> sandboxes = os::glob(path::join(
- paths::getSandboxRootDir(flags.work_dir),
+ paths::getSandboxRootDir(workDir),
"*",
"frameworks",
"*",
http://git-wip-us.apache.org/repos/asf/mesos/blob/bb048eca/src/slave/containerizer/mesos/isolators/xfs/disk.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/xfs/disk.hpp b/src/slave/containerizer/mesos/isolators/xfs/disk.hpp
index 52f0459..8f008f3 100644
--- a/src/slave/containerizer/mesos/isolators/xfs/disk.hpp
+++ b/src/slave/containerizer/mesos/isolators/xfs/disk.hpp
@@ -72,7 +72,7 @@ public:
private:
XfsDiskIsolatorProcess(
- const Flags& flags,
+ const std::string& workDir,
const IntervalSet<prid_t>& projectIds);
// Take the next project ID from the unallocated pool.
@@ -91,7 +91,7 @@ private:
const prid_t projectId;
};
- const Flags flags;
+ const std::string workDir;
const IntervalSet<prid_t> totalProjectIds;
IntervalSet<prid_t> freeProjectIds;
hashmap<ContainerID, process::Owned<Info>> infos;