plugins.git
10 years agoIPAM plugin: improve error messages
Neil Wilson [Mon, 7 Sep 2015 15:15:23 +0000 (15:15 +0000)]
IPAM plugin: improve error messages

Make it more clear that we failed to find an IPAM plugin.
Check for a missing plugin name and issue a more helpful error.

10 years agoplugin/ipam: fix typo in error message
Jonathan Boulle [Mon, 7 Sep 2015 22:43:34 +0000 (15:43 -0700)]
plugin/ipam: fix typo in error message

10 years agoCNI_ARGS: use ';' to split args as documented
Stefan Junker [Sat, 5 Sep 2015 16:58:58 +0000 (18:58 +0200)]
CNI_ARGS: use ';' to split args as documented

10 years agohost-local: allow ip request via CNI_ARGS
Stefan Junker [Sun, 16 Aug 2015 00:30:04 +0000 (02:30 +0200)]
host-local: allow ip request via CNI_ARGS

A specific IP can now be requested via the environment variable CNI_ARGS, e.g.
`CNI_ARGS=ip=1.2.3.4`.
The plugin will try to reserve the specified IP.
If this is not successful the execution will fail.

10 years agoenable net.ipv4.ip_forward in plugins that need it
Eugene Yakubovich [Mon, 13 Jul 2015 22:41:02 +0000 (15:41 -0700)]
enable net.ipv4.ip_forward in plugins that need it

10 years agoNo more path rewriting
Eugene Yakubovich [Fri, 12 Jun 2015 19:15:11 +0000 (12:15 -0700)]
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.

10 years agoPropagate json error object to the caller
Eugene Yakubovich [Tue, 2 Jun 2015 00:34:00 +0000 (17:34 -0700)]
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.

10 years agoadd DHCP IPAM plugin
Eugene Yakubovich [Tue, 19 May 2015 19:02:41 +0000 (12:02 -0700)]
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.

10 years agoMerge pull request #9 from eyakubovich/errors
Eugene Yakubovich [Fri, 8 May 2015 22:08:03 +0000 (15:08 -0700)]
Merge pull request #9 from eyakubovich/errors

report errors via JSON

10 years agoreport errors via JSON
Eugene Yakubovich [Thu, 30 Apr 2015 00:52:41 +0000 (17:52 -0700)]
report errors via JSON

This reflects the latest SPEC draft.

10 years agoDo not use netns as ID or for entropy
Eugene Yakubovich [Tue, 5 May 2015 20:35:20 +0000 (13:35 -0700)]
Do not use netns as ID or for entropy

ContainerID is now required so use that
or generate random bytes.

Fixes #5

10 years agoAdd plugin code
Eugene Yakubovich [Wed, 15 Apr 2015 22:35:02 +0000 (15:35 -0700)]
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.