mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] greggomann closed pull request #221: Fixed a bug in the logging of cni isolator.
Date Mon, 27 Aug 2018 17:56:21 GMT
greggomann closed pull request #221: Fixed a bug in the logging of cni isolator.
URL: https://github.com/apache/mesos/pull/221
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp b/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
index 3aecd8c5a2..08d3548c05 100644
--- a/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
+++ b/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
@@ -33,6 +33,7 @@
 #include <stout/os/constants.hpp>
 
 #include "common/protobuf_utils.hpp"
+#include "common/status_utils.hpp"
 
 #include "linux/fs.hpp"
 #include "linux/ns.hpp"
@@ -1994,11 +1995,14 @@ int NetworkCniIsolatorSetup::execute()
       return EXIT_FAILURE;
     }
 
-    if (os::spawn("ifconfig", {"ifconfig", "lo", "up"}) != 0) {
-      cerr << "Failed to bring up the loopback interface in the new "
-           << "network namespace of pid " << flags.pid.get()
-           << ": " << os::strerror(errno) << endl;
-      return EXIT_FAILURE;
+    int spawn = os::spawn("ifconfig", {"ifconfig", "lo", "up"});
+
+    if (spawn != 0) {
+        cerr << "Failed to bring up the loopback interface in the new "
+             << "network namespace of pid " << flags.pid.get() << ": "
+             << (spawn < 0 ? "Failed to fork or wait process" :
+                     WSTRINGIFY(spawn)) << endl;
+        return EXIT_FAILURE;
     }
   }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message