You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:03:04 UTC
svn commit: r1131733 - in /incubator/mesos/trunk/src: Makefile.in
process_based_isolation_module.cpp slave.cpp
Author: benh
Date: Sun Jun 5 05:03:04 2011
New Revision: 1131733
URL: http://svn.apache.org/viewvc?rev=1131733&view=rev
Log:
Updates trying to fix process abandonment issues when using the process based isolation module.
Modified:
incubator/mesos/trunk/src/Makefile.in
incubator/mesos/trunk/src/process_based_isolation_module.cpp
incubator/mesos/trunk/src/slave.cpp
Modified: incubator/mesos/trunk/src/Makefile.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/Makefile.in?rev=1131733&r1=1131732&r2=1131733&view=diff
==============================================================================
--- incubator/mesos/trunk/src/Makefile.in (original)
+++ incubator/mesos/trunk/src/Makefile.in Sun Jun 5 05:03:04 2011
@@ -221,7 +221,7 @@ swig/java/nexus.jar: $(JAVA_LIB)
ifdef JAVA_HOME
javac -sourcepath swig/java -d swig/java swig/java/nexus/*.java
patch -N swig/java/nexus/nexusJNI.java < swig/java/nexusJNI.java.patch1 || echo -n
- patch swig/java/nexus/nexusJNI.java < swig/java/nexusJNI.java.patch2
+ patch swig/java/nexus/nexusJNI.java < swig/java/nexusJNI.java.patch2 || echo -n
jar cf $@ -C swig/java nexus
endif
Modified: incubator/mesos/trunk/src/process_based_isolation_module.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/process_based_isolation_module.cpp?rev=1131733&r1=1131732&r2=1131733&view=diff
==============================================================================
--- incubator/mesos/trunk/src/process_based_isolation_module.cpp (original)
+++ incubator/mesos/trunk/src/process_based_isolation_module.cpp Sun Jun 5 05:03:04 2011
@@ -65,15 +65,16 @@ void ProcessBasedIsolationModule::startE
PLOG(FATAL) << "Failed to fork to launch new executor";
if (pid) {
- // In parent process, record the gpid for killpg later (the pid is
- // the gpid because the child does a setsid below).
+ // In parent process, record the pgid for killpg later.
LOG(INFO) << "Started executor, OS pid = " << pid;
pgids[framework->id] = pid;
framework->executorStatus = "PID: " + lexical_cast<string>(pid);
} else {
- // In child process, do setsid to make cleanup easier.
- if ((pid = setsid()) == -1)
- perror("setsid error");
+ // In child process, make cleanup easier.
+ if (setpgid(0, 0) < 0)
+ PLOG(FATAL) << "Failed to put executor in own process group";
+// if ((pid = setsid()) == -1)
+// PLOG(FATAL) << "Failed to put executor in own session";
createExecutorLauncher(framework)->run();
}
Modified: incubator/mesos/trunk/src/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave.cpp?rev=1131733&r1=1131732&r2=1131733&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave.cpp Sun Jun 5 05:03:04 2011
@@ -186,6 +186,8 @@ void Slave::operator () ()
ZooKeeper *zk;
if (!zookeeper.empty())
zk = new ZooKeeper(zookeeper, 10000, new SlaveWatcher(this));
+ else
+ send(self(), pack<S2S_GOT_MASTER>());
#else
send(self(), pack<S2S_GOT_MASTER>());
#endif