You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2018/09/27 22:45:09 UTC

[mesos] branch 1.5.x updated (0216002 -> 1046ea8)

This is an automated email from the ASF dual-hosted git repository.

jieyu pushed a change to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from 0216002  Fixed broken pipe error in IOSwitchboard.
     new acb8566  Skipped CNI config load if named network is not enabled.
     new 1046ea8  Added MESOS-9267 to 1.5.2 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG                                          |  1 +
 .../mesos/isolators/network/cni/cni.cpp            | 41 ++++++++++++----------
 2 files changed, 24 insertions(+), 18 deletions(-)


[mesos] 01/02: Skipped CNI config load if named network is not enabled.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jieyu pushed a commit to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit acb8566f6cbd9e6c58500eb520205f821357bf7b
Author: Jie Yu <yu...@gmail.com>
AuthorDate: Wed Sep 26 21:38:05 2018 -0700

    Skipped CNI config load if named network is not enabled.
    
    If the operator didn't turn on named CNI network support (i.e., both
    agent flags `network_cni_config_dir` and `network_cni_plugins_dir` are
    not specified), the CNI should not attempt to load the network configs.
    This patch fixed a potential CHECK failure.
    
    Review: https://reviews.apache.org/r/68861
    (cherry picked from commit 832ebc2beddbe8d38427c2ce0e5578bcaee69b35)
---
 .../mesos/isolators/network/cni/cni.cpp            | 41 ++++++++++++----------
 1 file changed, 23 insertions(+), 18 deletions(-)

diff --git a/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp b/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
index 5eaab09..feede9a 100644
--- a/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
+++ b/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
@@ -1783,27 +1783,32 @@ Try<JSON::Object> NetworkCniIsolatorProcess::getNetworkConfigJSON(
   }
 
   // Cache-miss.
-  Try<hashmap<string, string>> _networkConfigs = loadNetworkConfigs(
-      flags.network_cni_config_dir.get(),
-      flags.network_cni_plugins_dir.get());
+  if (rootDir.isSome()) {
+    CHECK_SOME(flags.network_cni_config_dir);
+    CHECK_SOME(flags.network_cni_plugins_dir);
 
-  if (_networkConfigs.isError()) {
-      return Error(
-          "Encountered error while loading CNI config during "
-          "a cache-miss for CNI network '" + network + "': " +
-          _networkConfigs.error());
-  }
+    Try<hashmap<string, string>> _networkConfigs = loadNetworkConfigs(
+        flags.network_cni_config_dir.get(),
+        flags.network_cni_plugins_dir.get());
 
-  networkConfigs = _networkConfigs.get();
+    if (_networkConfigs.isError()) {
+        return Error(
+            "Encountered error while loading CNI config during "
+            "a cache-miss for CNI network '" + network + "': " +
+            _networkConfigs.error());
+    }
 
-  // Do another search.
-  if (networkConfigs.contains(network)) {
-    // This is a best-effort retrieval of the CNI network config. So
-    // if it fails in this attempt just return the `Error` instead of
-    // trying to erase the network from cache. Deletion of the
-    // network, in case of an error, will happen on its own in the
-    // next attempt.
-    return getNetworkConfigJSON(network, networkConfigs[network]);
+    networkConfigs = _networkConfigs.get();
+
+    // Do another search.
+    if (networkConfigs.contains(network)) {
+      // This is a best-effort retrieval of the CNI network config. So
+      // if it fails in this attempt just return the `Error` instead of
+      // trying to erase the network from cache. Deletion of the
+      // network, in case of an error, will happen on its own in the
+      // next attempt.
+      return getNetworkConfigJSON(network, networkConfigs[network]);
+    }
   }
 
   return Error("Unknown CNI network '" + network + "'");


[mesos] 02/02: Added MESOS-9267 to 1.5.2 CHANGELOG.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jieyu pushed a commit to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 1046ea8b68278f8fe2d70171425072290785b788
Author: Jie Yu <yu...@gmail.com>
AuthorDate: Thu Sep 27 15:41:55 2018 -0700

    Added MESOS-9267 to 1.5.2 CHANGELOG.
    
    (cherry picked from commit dbe2f9df667baab845b2f7861eb9ae16301f9c2f)
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 51428f6..1b1be09 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,6 +36,7 @@ Release Notes - Mesos - Version 1.5.2 (WIP)
   * [MESOS-9147] - Agent and scheduler driver authentication retry backoff time could overflow.
   * [MESOS-9170] - Zookeeper doesn't compile with newer gcc due to format error.
   * [MESOS-9196] - Removing rootfs mounts may fail with EBUSY.
+  * [MESOS-9267] - Mesos agent crashes when CNI network is not configured but used.
 
 
 Release Notes - Mesos - Version 1.5.1