You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Qian Zhang (JIRA)" <ji...@apache.org> on 2018/07/20 01:20:00 UTC

[jira] [Comment Edited] (MESOS-7176) Add versioning support to network/cni isolator

    [ https://issues.apache.org/jira/browse/MESOS-7176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374228#comment-16374228 ] 

Qian Zhang edited comment on MESOS-7176 at 7/20/18 1:19 AM:
------------------------------------------------------------

According to [CNI spec|https://github.com/containernetworking/cni/blob/master/SPEC.md#released-versions], one of the major changes introduced in CNI spec 0.3.0 is rich result type, the result type of CNI spec 0.3.0 is [https://github.com/containernetworking/cni/blob/spec-v0.3.0/SPEC.md#result|https://github.com/containernetworking/cni/blob/spec-v0.3.0/SPEC.md#result] which is different from CNI spec 0.2.0. What CNI isolator in Mesos is using is CNI spec 0.2.0, see [here|https://github.com/apache/mesos/blob/1.5.0/src/slave/containerizer/mesos/isolators/network/cni/spec.proto#L63:L67] for details.

As a result, currently CNI isolator can NOT support CNI network configuration whose version is 0.3.0+, because if CNI isolator invokes a CNI plugins (suppose it also supports CNI spec 0.3.0+) with a CNI network configuration of version 0.3.0+ (see below as an example) as its input, the CNI plugin will return the result which conforms the same version of CNI spec as the input CNI network configuration (i.e., 0.3.0 in the example below), but CNI isolator will always use CNI spec 0.2.0 to parse the result (see [here|https://github.com/apache/mesos/blob/1.5.0/src/slave/containerizer/mesos/isolators/network/cni/spec.cpp#L46:L59] for details.) which will fail.
{code:java}
{
  "cniVersion": "0.3.0",
  "name": "dbnet",
  "type": "bridge",
  "bridge": "cni0",
  "ipam": {
    "type": "dhcp"
  }
}{code}
So I think we should improve CNI isolator to support CNI spec 0.3.0 as well, and parse the result returned by CNI plugin based on the CNI spec version of the result.


was (Author: qianzhang):
According to [CNI spec|https://github.com/containernetworking/cni/blob/master/SPEC.md#released-versions], one of the major changes introduced in CNI spec 0.3.0 is rich result type, the result type of CNI spec 0.3.0 is [https://github.com/containernetworking/cni/blob/spec-v0.3.0/SPEC.md#result|https://github.com/containernetworking/cni/blob/spec-v0.3.0/SPEC.md#result,] which is different from CNI spec 0.2.0. What CNI isolator in Mesos is using is CNI spec 0.2.0, see [here|https://github.com/apache/mesos/blob/1.5.0/src/slave/containerizer/mesos/isolators/network/cni/spec.proto#L63:L67] for details.

As a result, currently CNI isolator can NOT support CNI network configuration whose version is 0.3.0+, because if CNI isolator invokes a CNI plugins (suppose it also supports CNI spec 0.3.0+) with a CNI network configuration of version 0.3.0+ (see below as an example) as its input, the CNI plugin will return the result which conforms the same version of CNI spec as the input CNI network configuration (i.e., 0.3.0 in the example below), but CNI isolator will always use CNI spec 0.2.0 to parse the result (see [here|https://github.com/apache/mesos/blob/1.5.0/src/slave/containerizer/mesos/isolators/network/cni/spec.cpp#L46:L59] for details.) which will fail.
{code:java}
{
  "cniVersion": "0.3.0",
  "name": "dbnet",
  "type": "bridge",
  "bridge": "cni0",
  "ipam": {
    "type": "dhcp"
  }
}{code}
So I think we should improve CNI isolator to support CNI spec 0.3.0 as well, and parse the result returned by CNI plugin based on the CNI spec version of the result.

> Add versioning support to network/cni isolator
> ----------------------------------------------
>
>                 Key: MESOS-7176
>                 URL: https://issues.apache.org/jira/browse/MESOS-7176
>             Project: Mesos
>          Issue Type: Task
>          Components: containerization
>            Reporter: Avinash Sridharan
>            Assignee: Deepak Goel
>            Priority: Major
>
> Currently the network/cni isolator support CNI SPEC version 0.2 . The CNI SPEC version 0.3 has already been ratified and introduces new features such as CNI service chaining and CNI plugin capabilities. However, CNI spec version 0.3 is incompatible with CNI spec 0.2. Hence we need to introduce versioning support in `network/cni` isolator in order to make it backward compatible.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)