Converted watchdog option into childhook in Mesos [2/2].

Review: https://reviews.apache.org/r/52121/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3c730dc4
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3c730dc4
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3c730dc4

Branch: refs/heads/master
Commit: 3c730dc42e35d13dbeaf69ce391766d4ba7ba962
Parents: 6d58c24
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Wed Sep 21 09:50:43 2016 -0700
Committer: Jie Yu <yujie....@gmail.com>
Committed: Wed Sep 21 09:50:43 2016 -0700

----------------------------------------------------------------------
 src/linux/perf.cpp                                            | 7 +++----
 .../containerizer/mesos/isolators/docker/volume/driver.cpp    | 7 ++-----
 src/slave/containerizer/mesos/isolators/posix/disk.cpp        | 6 ++----
 3 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3c730dc4/src/linux/perf.cpp
----------------------------------------------------------------------
diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp
index 7aff800..aa31982 100644
--- a/src/linux/perf.cpp
+++ b/src/linux/perf.cpp
@@ -113,7 +113,7 @@ protected:
   {
     // Kill the perf process (if it's still running) by sending
     // SIGTERM to the signal handler which will then SIGKILL the
-    // perf process group created by the watchdog process.
+    // perf process group created by the supervisor process.
     if (perf.isSome() && perf->status().isPending()) {
       kill(perf->pid(), SIGTERM);
     }
@@ -124,7 +124,7 @@ protected:
 private:
   void execute()
   {
-    // NOTE: The watchdog process places perf in its own process group
+    // NOTE: The supervisor childhook places perf in its own process group
     // and will kill the perf process when the parent dies.
     Try<Subprocess> _perf = subprocess(
         "perf",
@@ -136,8 +136,7 @@ private:
         None(),
         None(),
         {},
-        {},
-        MONITOR);
+        {Subprocess::ChildHook::SUPERVISOR()});
 
     if (_perf.isError()) {
       promise.fail("Failed to launch perf process: " + _perf.error());

http://git-wip-us.apache.org/repos/asf/mesos/blob/3c730dc4/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp 
b/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
index f4b690c..cf0466c 100644
--- a/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
+++ b/src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp
@@ -36,7 +36,6 @@ using std::vector;
 
 using process::Failure;
 using process::Future;
-using process::MONITOR;
 using process::Owned;
 using process::Subprocess;
 
@@ -93,8 +92,7 @@ Future<string> DriverClient::mount(
       None(),
       None(),
       {},
-      {},
-      MONITOR);
+      {Subprocess::ChildHook::SUPERVISOR()});
 
   if (s.isError()) {
     return Failure("Failed to execute '" + command + "': " + s.error());
@@ -178,8 +176,7 @@ Future<Nothing> DriverClient::unmount(
       None(),
       None(),
       {},
-      {},
-      MONITOR);
+      {Subprocess::ChildHook::SUPERVISOR()});
 
   if (s.isError()) {
     return Failure("Failed to execute '" + command + "': " + s.error());

http://git-wip-us.apache.org/repos/asf/mesos/blob/3c730dc4/src/slave/containerizer/mesos/isolators/posix/disk.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/posix/disk.cpp 
b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
index b5a2cb5..db05833 100644
--- a/src/slave/containerizer/mesos/isolators/posix/disk.cpp
+++ b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
@@ -58,7 +58,6 @@ using std::vector;
 
 using process::Failure;
 using process::Future;
-using process::MONITOR;
 using process::Owned;
 using process::PID;
 using process::Process;
@@ -538,7 +537,7 @@ private:
     // Add path on which 'du' must be run.
     command.push_back(entry->path);
 
-    // NOTE: The monitor watchdog will watch the parent process and kill
+    // NOTE: The supervisor childhook will watch the parent process and kill
     // the 'du' process in case that the parent die.
     Try<Subprocess> s = subprocess(
         "du",
@@ -550,8 +549,7 @@ private:
         None(),
         None(),
         {},
-        {},
-        MONITOR);
+        {Subprocess::ChildHook::SUPERVISOR()});
 
     if (s.isError()) {
       entry->promise.fail("Failed to exec 'du': " + s.error());

Reply via email to