63 Commits

Author SHA1 Message Date
Stefan Junker
d896b82816 ipvlan/macvlan: remove ipMasq related code
Luckily the docs haven't mentioned support for ipMasq for both plugins so far.
Even if anyone has attempted to enable the feature in their configuration files it didn't have the desired effect for the network.
2015-09-09 14:16:39 +02:00
Eugene Yakubovich
64f5cf9e82 Rename veth plugin to ptp and add docs.
ptp (point-to-point) better describes the nature of the plugin
as veth pairs are also used by the bridge plugin.
2015-07-21 17:20:11 -07:00
Eugene Yakubovich
d053cd7184 Merge pull request #35 from eyakubovich/ip_forward
enable net.ipv4.ip_forward in plugins that need it
2015-07-21 17:12:04 -07:00
Eugene Yakubovich
91454b6ebb enable net.ipv4.ip_forward in plugins that need it 2015-07-13 15:41:02 -07:00
Eugene Yakubovich
cc393ddba7 ipvlan: wrong name was used during link creation
Instead of temp (random) name, the final name (e.g. eth0)
was used during link creation. This would collide on hosts
that already had the an interface with such a name.
2015-07-10 14:02:35 -07:00
Eugene Yakubovich
16680be42d No more path rewriting
Path rewriting causes too many problems when vendoring
vendored code. When CNI code is vendored into rkt,
godep has problems code already vendored by CNI.
2015-06-12 16:29:18 -07:00
Eugene Yakubovich
33a575f49d Propagate json error object to the caller
When plugin errors out, it prints out a JSON object to stdout
describing the failure. This object needs to be propagated out
through the plugins and to the container runtime. This change
also adds Print method to both the result and error structs
for easy serialization to stdout.
2015-06-09 10:46:28 -07:00
Eugene Yakubovich
c70320b5ed add DHCP IPAM plugin
The plugin binary actually functions in two modes. The first mode
is a regular CNI plugin. The second mode (when stared with "daemon" arg)
runs a DHCP client daemon. When executed as a CNI plugin, it issues
an RPC request to the daemon for actual processing. The daemon is
required since a DHCP lease needs to be maintained by periodically
renewing it. One instance of the daemon can server arbitrary number
of containers/leases.
2015-05-21 13:36:51 -07:00
Eugene Yakubovich
7a8ee49891 macvlan and ipvlan: rename tmp iface name prior to calling IPAM 2015-05-19 17:43:44 -07:00
Eugene Yakubovich
0c3baa8ff0 fix bridge to call IPAM after link creation 2015-05-19 17:43:44 -07:00
Eugene Yakubovich
b2d9801b25 Do not use netns as ID or for entropy
ContainerID is now required so use that
or generate random bytes.

Fixes #5
2015-05-08 15:02:23 -07:00
Stefan Junker
1a71eb0caf plugins: add ipvlan main plugin
Add the ipvlan main plugin which is heavily based on the macvlan plugin.
Availabile modes for this plugin are l2 and l3, wheres l2 has the higher
compatibility due to support for multicast and broadcasts. L2 has therefore been
chosen as the default mode.
See the official docs at
https://www.kernel.org/doc/Documentation/networking/ipvlan.txt
for more information.

Fixes #6.
2015-05-02 23:18:03 -07:00
Eugene Yakubovich
88377fa346 Add plugin code
This adds basic plugins.
"main" types: veth, bridge, macvlan
"ipam" type: host-local

The code has been ported over from github.com/coreos/rkt project
and adapted to fit the CNI spec.
2015-04-27 14:14:29 -07:00