DevinLeamy commented on code in PR #552:
URL: https://github.com/apache/mesos/pull/552#discussion_r1559901682


##########
src/slave/containerizer/mesos/linux_launcher.cpp:
##########
@@ -251,48 +303,104 @@ Future<ContainerStatus> LinuxLauncher::status(
 }
 
 
-// `_systemdHierarchy` is only set if running on a systemd environment.
 LinuxLauncherProcess::LinuxLauncherProcess(
-    const Flags& _flags,
-    const string& _freezerHierarchy,
-    const Option<string>& _systemdHierarchy)
-  : flags(_flags),
-    freezerHierarchy(_freezerHierarchy),
-    systemdHierarchy(_systemdHierarchy) {}
+  const Flags& _flags, const CgroupsInfo& _cgroupsInfo)
+  : flags(_flags), cgroupsInfo(_cgroupsInfo) {}
 
 
 Future<hashset<ContainerID>> LinuxLauncherProcess::recover(
     const vector<ContainerState>& states)
 {
   LOG(INFO) << "Recovering Linux launcher";
 
+  // Now loop through the containers expected by ContainerState so we
+  // can have a complete list of the containers we might ever want to
+  // destroy as well as be able to determine orphans below.
+  hashset<ContainerID> expected = {};
+
+  foreach (const ContainerState& state, states) {
+    expected.insert(state.container_id());
+
+    if (!containers.contains(state.container_id())) {
+      // The fact that we did not have a freezer (or systemd) cgroup
+      // for this container implies this container has already been

Review Comment:
   You're right. I've updated the order to recover before looping here :+1: 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to