cf-natali commented on a change in pull request #355: Handle EBUSY when 
destroying a cgroup.
URL: https://github.com/apache/mesos/pull/355#discussion_r406378603
 
 

 ##########
 File path: src/linux/cgroups.cpp
 ##########
 @@ -1535,22 +1629,20 @@ class Destroyer : public Process<Destroyer>
 
   void remove()
   {
-    foreach (const string& cgroup, cgroups) {
-      Try<Nothing> remove = cgroups::remove(hierarchy, cgroup);
-      if (remove.isError()) {
-        // If the `cgroup` still exists in the hierarchy, treat this as
-        // an error; otherwise, treat this as a success since the `cgroup`
-        // has actually been cleaned up.
-        if (os::exists(path::join(hierarchy, cgroup))) {
-          promise.fail(
-              "Failed to remove cgroup '" + cgroup + "': " + remove.error());
-          terminate(self());
-          return;
-        }
-      }
+    Future<Nothing> remove_all = internal::remove(hierarchy, cgroups);
 
 Review comment:
   Done.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to