You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2019/08/06 02:44:56 UTC

[mesos] branch 1.6.x updated (775a84c -> 472d0d9)

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

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


    from 775a84c  Added MESOS-9870 to the 1.6.3 CHANGELOG.
     new a34993f  Looked up parent's IP for the non-checkpointed nested containers.
     new 472d0d9  Added MESOS-9868 to the 1.6.3 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 +
 .../containerizer/mesos/isolators/network/cni/cni.cpp | 19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)


[mesos] 01/02: Looked up parent's IP for the non-checkpointed nested containers.

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

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

commit a34993f8e273dc5c4ea4ff37ef776864ca2a0e2c
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Sat Jul 27 15:34:23 2019 +0800

    Looked up parent's IP for the non-checkpointed nested containers.
    
    Review: https://reviews.apache.org/r/71172
---
 .../containerizer/mesos/isolators/network/cni/cni.cpp | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp b/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
index 2200192..0526013 100644
--- a/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
+++ b/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
@@ -1409,12 +1409,29 @@ Future<Nothing> NetworkCniIsolatorProcess::_attach(
 Future<ContainerStatus> NetworkCniIsolatorProcess::status(
     const ContainerID& containerId)
 {
+  const bool isNestedContainer = containerId.has_parent();
+
   // TODO(jieyu): We don't create 'Info' struct for containers that
   // want to join the host network and have no image. Currently, we
   // rely on the slave/containerizer to set the IP addresses in
   // ContainerStatus.  Consider returning the IP address of the slave
   // here.
   if (!infos.contains(containerId)) {
+    if (isNestedContainer) {
+      // There are two cases that `infos` does not contain a nested container:
+      //   1. The nested container has no image and joins host network (i.e.,
+      //      it does not specify `NetworkInfo.name` and its parent joins host
+      //      network). In this case, we do not create `Info` struct for this
+      //      nested container.
+      //   2. The nested container joins the CNI network that its parent joins,
+      //      and then agent is restarted. After recovery `infos` will not
+      //      contain the nested container since we do not checkpoint it in the
+      //      runtime directory.
+      // For both of these two cases, to obtain the network info of the nested
+      // container, we should look up its parent.
+      return status(containerId.parent());
+    }
+
     return ContainerStatus();
   }
 
@@ -1422,8 +1439,6 @@ Future<ContainerStatus> NetworkCniIsolatorProcess::status(
   // wants to joins the parent's network, we should look up the IP
   // address of the root container of the hierarchy to which this
   // container belongs.
-  const bool isNestedContainer = containerId.has_parent();
-
   if (isNestedContainer && infos[containerId]->joinsParentsNetwork) {
     return status(containerId.parent());
   }


[mesos] 02/02: Added MESOS-9868 to the 1.6.3 CHANGELOG.

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

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

commit 472d0d9bac9503b84c0a628e32518f64e806ff65
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Tue Aug 6 10:25:04 2019 +0800

    Added MESOS-9868 to the 1.6.3 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 58dbe6b..a4aa80e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,7 @@ Release Notes - Mesos - Version 1.6.3 (WIP)
   * [MESOS-9787] - Log slow SSL (TLS) peer reverse DNS lookup.
   * [MESOS-9852] - Slow memory growth in master due to deferred deletion of offer filters and timers.
   * [MESOS-9856] - REVIVE call with specified role(s) clears filters for all roles of a framework.
+  * [MESOS-9868] - NetworkInfo from the agent /state endpoint is not correct.
   * [MESOS-9870] - Simultaneous adding/removal of a role from framework's roles and its suppressed roles crashes the master.
 
 ** Improvement