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 08:42:48 UTC
svn commit: r1131967 - in /incubator/mesos/trunk/src:
lxc_isolation_module.cpp slave.hpp
Author: benh
Date: Sun Jun 5 06:42:48 2011
New Revision: 1131967
URL: http://svn.apache.org/viewvc?rev=1131967&view=rev
Log:
Fixing build issues on Linux.
Modified:
incubator/mesos/trunk/src/lxc_isolation_module.cpp
incubator/mesos/trunk/src/slave.hpp
Modified: incubator/mesos/trunk/src/lxc_isolation_module.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/lxc_isolation_module.cpp?rev=1131967&r1=1131966&r2=1131967&view=diff
==============================================================================
--- incubator/mesos/trunk/src/lxc_isolation_module.cpp (original)
+++ incubator/mesos/trunk/src/lxc_isolation_module.cpp Sun Jun 5 06:42:48 2011
@@ -164,13 +164,15 @@ void LxcIsolationModule::resourcesChange
int32_t cpuShares = max(CPU_SHARES_PER_CPU * fw->resources.cpus,
MIN_CPU_SHARES);
if (!setResourceLimit(fw, "cpu.shares", cpuShares)) {
- slave->removeExecutor(fw->id, true);
+ // Tell slave to kill framework, which will invoke killExecutor.
+ slave->killFramework(fw);
return;
}
int64_t rssLimit = max(fw->resources.mem, MIN_RSS);
if (!setResourceLimit(fw, "memory.limit_in_bytes", rssLimit)) {
- slave->removeExecutor(fw->id, true);
+ // Tell slave to kill framework, which will invoke killExecutor.
+ slave->killFramework(fw);
return;
}
}
@@ -239,7 +241,7 @@ void LxcIsolationModule::Reaper::operato
LOG(INFO) << "Telling slave of lost framework " << fid;
// TODO(benh): This is broken if/when libprocess is parallel!
module->slave->executorExited(fid, status);
- delete module->infos[fw->id];
+ delete module->infos[fid];
module->infos.erase(fid);
break;
}
Modified: incubator/mesos/trunk/src/slave.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave.hpp?rev=1131967&r1=1131966&r2=1131967&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave.hpp (original)
+++ incubator/mesos/trunk/src/slave.hpp Sun Jun 5 06:42:48 2011
@@ -189,6 +189,9 @@ public:
// Callback used by isolation module to tell us when an executor exits.
void executorExited(FrameworkID frameworkId, int status);
+ // Kill a framework (possibly killing its executor).
+ void killFramework(Framework *framework, bool killExecutor = true);
+
string getUniqueWorkDirectory(FrameworkID fid);
const Params& getConf();
@@ -203,9 +206,6 @@ protected:
// Send any tasks queued up for the given framework to its executor
// (needed if we received tasks while the executor was starting up).
void sendQueuedTasks(Framework *framework);
-
- // Kill a framework (possibly killing its executor).
- void killFramework(Framework *framework, bool killExecutor = true);
};
}}}