mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avinash sridharan <avin...@mesosphere.io>
Subject Review Request 51097: Added a `PortMapper` class.
Date Mon, 15 Aug 2016 20:49:41 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51097/
-----------------------------------------------------------

Review request for mesos, Jie Yu and Qian Zhang.


Bugs: MESOS-6023
    https://issues.apache.org/jira/browse/MESOS-6023


Repository: mesos


Description
-------

This class will embody the logic for implementing the CNI port-mapper
plugin.


Diffs
-----

  src/Makefile.am d389e02584cfb1a00067cd30de1364118d1c46c7 
  src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/main.cpp PRE-CREATION

  src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/port_mapper.hpp
PRE-CREATION 
  src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/port_mapper.cpp
PRE-CREATION 

Diff: https://reviews.apache.org/r/51097/diff/


Testing
-------

Tested the port-mapper with the following CNI config:
{
    "name": "mynet",
    "type": "port-mapper",
    "chain": "MESOS",
    "delegate": {
      "type" : "bridge",
      "bridge": "cni0",
      "isGateway": true,
      "ipMasq": true,
      "ipam": {
          "type": "host-local",
          "subnet": "10.22.0.0/16",
          "routes": [
            { "dst": "0.0.0.0/0" }
          ]
      }
    },
    "args" : {
      "org.apache.mesos" : {
        "network_info" : {
          "port_mappings": {
            "host_port" : 80,
            "container_port" : 80
          }
        }
      }
    }
}

If we remove fields from the above CNI config, the creation of the `PortMapper` correctly
fails. However, if config is passed as is it will create the `PortMapper` correctly.


Thanks,

Avinash sridharan


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message