cni.git
9 years agoplugins/host-local: only call LoadArgs() once
Stefan Junker [Thu, 17 Mar 2016 12:57:28 +0000 (13:57 +0100)]
plugins/host-local: only call LoadArgs() once

9 years agoMerge pull request #162 from zachgersh/remove-workspace
Stefan Junker [Mon, 21 Mar 2016 16:48:25 +0000 (17:48 +0100)]
Merge pull request #162 from zachgersh/remove-workspace

build script: remove the _workspace from GOPATH

9 years agobuild script: remove the _workspace from GOPATH
zachgersh [Mon, 21 Mar 2016 15:34:07 +0000 (08:34 -0700)]
build script: remove the _workspace from GOPATH

Now that we no longer use godeps to manage
dependencies we can safely remove this.
Dependencies in the vendor directory will
automagically be picked up.

9 years agoMerge pull request #161 from steveeJ/skel-tests
Zach Gershman [Sun, 20 Mar 2016 01:09:07 +0000 (18:09 -0700)]
Merge pull request #161 from steveeJ/skel-tests

pkg/skel: add rudimentary unit tests

9 years agopkg/skel: add rudimentary unit tests
Stefan Junker [Fri, 18 Mar 2016 21:28:14 +0000 (22:28 +0100)]
pkg/skel: add rudimentary unit tests

This is an attempt to testing the PluginMain() function of the skel pkg.
We should be able to do better by using a mockable interface for the
plugins, but this is a start.

9 years agoMerge pull request #156 from zachgersh/vendor
Stefan Junker [Thu, 17 Mar 2016 09:02:30 +0000 (10:02 +0100)]
Merge pull request #156 from zachgersh/vendor

Moves to go team vendoring solution

9 years agoMerge pull request #157 from achanda/vet
Zach Gershman [Thu, 17 Mar 2016 00:01:57 +0000 (17:01 -0700)]
Merge pull request #157 from achanda/vet

Fix govet warnings

9 years agoLet go tip fail, add vendor flag for 1.5
Zachary Gershman [Thu, 17 Mar 2016 00:00:51 +0000 (17:00 -0700)]
Let go tip fail, add vendor flag for 1.5

9 years agoFix govet warnings
Abhishek Chanda [Wed, 16 Mar 2016 23:25:41 +0000 (16:25 -0700)]
Fix govet warnings

9 years agoMoves to official vendoring solution
Zachary Gershman [Wed, 16 Mar 2016 15:38:20 +0000 (08:38 -0700)]
Moves to official vendoring solution

9 years agoMerge pull request #154 from rosenhouse/withnetns-errors
Zach Gershman [Tue, 15 Mar 2016 15:39:01 +0000 (08:39 -0700)]
Merge pull request #154 from rosenhouse/withnetns-errors

WithNetNS restores original namespace when callback errors

9 years agoUpdate docstring on WithNetNS
Gabe Rosenhouse [Tue, 15 Mar 2016 15:37:00 +0000 (08:37 -0700)]
Update docstring on WithNetNS

9 years agoWithNetNS restores original namespace when callback errors
Gabe Rosenhouse [Tue, 15 Mar 2016 01:57:16 +0000 (18:57 -0700)]
WithNetNS restores original namespace when callback errors

- adds test coverage of WithNetNS in BDD-style

9 years agoMerge pull request #146 from achanda/trusty
Zach Gershman [Tue, 15 Mar 2016 00:42:03 +0000 (17:42 -0700)]
Merge pull request #146 from achanda/trusty

Use Ubuntu Trusty in travis

9 years agoMerge pull request #153 from steveeJ/maintainer-add-zach
Zach Gershman [Mon, 14 Mar 2016 22:52:21 +0000 (15:52 -0700)]
Merge pull request #153 from steveeJ/maintainer-add-zach

MAINTAINERS: welcome Zach!

9 years agoMAINTAINERS: welcome Zach!
Stefan Junker [Mon, 14 Mar 2016 21:56:25 +0000 (22:56 +0100)]
MAINTAINERS: welcome Zach!

We are pleased to welcome Zach on board as CNI maintainer.
Happy collaboration!

9 years agoMerge pull request #148 from steveeJ/coverage-batches
Stefan Junker [Wed, 9 Mar 2016 16:30:41 +0000 (17:30 +0100)]
Merge pull request #148 from steveeJ/coverage-batches

travis & README: add coveralls coverage report

9 years agotravis & README: add coveralls coverage report
Stefan Junker [Fri, 4 Mar 2016 19:19:26 +0000 (20:19 +0100)]
travis & README: add coveralls coverage report

Also, don't use sudo for the entire test script

9 years agoMerge pull request #144 from squaremo/rename-delegate-execs
Stefan Junker [Fri, 4 Mar 2016 12:20:35 +0000 (13:20 +0100)]
Merge pull request #144 from squaremo/rename-delegate-execs

Add invoke.Delegate{Add,Del} for use by meta-plugins

9 years agoAdd invoke.Delegate{Add,Del} for use by meta-plugins
Michael Bridgen [Wed, 2 Mar 2016 17:02:52 +0000 (17:02 +0000)]
Add invoke.Delegate{Add,Del} for use by meta-plugins

The 'flannel' meta plugin delegates to other plugins to do the actual
OS-level work. It used the ipam.Exec{Add,Del} procedures for this
delegation, since those do precisely what's needed.

However this is a bit misleading, since the flannel plugin _isn't_
doing this for IPAM, and the ipam.Exec* procedures aren't doing
something specific to IPAM plugins.

So: anticipating that there may be more meta plugins that want to
delegate in the same way, this commit moves generic delegation
procedures to `pkg/invoke`, and makes the `pkg/ipam` procedures (still
used, accurately, in the non-meta plugins) shims.

9 years agoMerge pull request #142 from steveeJ/fix-loopback-result
Stefan Junker [Thu, 3 Mar 2016 08:03:51 +0000 (09:03 +0100)]
Merge pull request #142 from steveeJ/fix-loopback-result

Fix loopback result

9 years agoUse Ubuntu Trusty in travis
Abhishek Chanda [Thu, 3 Mar 2016 04:00:11 +0000 (20:00 -0800)]
Use Ubuntu Trusty in travis

This boots faster

9 years agoMerge pull request #143 from zachgersh/more-tests
Stefan Junker [Wed, 2 Mar 2016 18:01:13 +0000 (19:01 +0100)]
Merge pull request #143 from zachgersh/more-tests

More tests

9 years agotests: loopback DEL
Stefan Junker [Wed, 2 Mar 2016 16:56:44 +0000 (17:56 +0100)]
tests: loopback DEL

9 years agoAdds travis badge, now we have more tests
zachgersh [Wed, 2 Mar 2016 16:43:27 +0000 (11:43 -0500)]
Adds travis badge, now we have more tests

9 years agoMake sure invoke tests are running
zachgersh [Wed, 2 Mar 2016 16:38:33 +0000 (11:38 -0500)]
Make sure invoke tests are running

9 years agotests: loopback stdout must be JSON
Stefan Junker [Wed, 2 Mar 2016 14:22:16 +0000 (15:22 +0100)]
tests: loopback stdout must be JSON

9 years agoplugins/loopback: take lo down on CmdDel
Stefan Junker [Wed, 2 Mar 2016 11:54:43 +0000 (12:54 +0100)]
plugins/loopback: take lo down on CmdDel

9 years agoplugins/loopback: return empty result
Stefan Junker [Wed, 2 Mar 2016 11:53:02 +0000 (12:53 +0100)]
plugins/loopback: return empty result

This is needed to conform to the specification and allow successful
unmarshalling in the invoker.

9 years agoMerge pull request #120 from zachgersh/find-better-error
Stefan Junker [Wed, 2 Mar 2016 10:14:50 +0000 (11:14 +0100)]
Merge pull request #120 from zachgersh/find-better-error

Better error messages when plugin is not found

9 years agoMerge pull request #121 from zachgersh/loopback-plugin
Stefan Junker [Wed, 2 Mar 2016 08:32:01 +0000 (09:32 +0100)]
Merge pull request #121 from zachgersh/loopback-plugin

Loopback plugin

9 years agoHandle namespaces with care
zachgersh [Mon, 22 Feb 2016 03:23:14 +0000 (19:23 -0800)]
Handle namespaces with care

- After creating new netns, switch back to main netns
- Lock thread during test and test setup

9 years agoCreate a plugin for up'ing a lo device
Zachary Gershman [Fri, 12 Feb 2016 17:30:10 +0000 (09:30 -0800)]
Create a plugin for up'ing a lo device

- Believe we need sudo to create netns
- Use syscall instead of relying on ip netns
- Add sudo to .travis.yml
- Needs more -E
- Revert Godeps GoVersion to 1.4.2
- in travis, test command is run with all necessary env vars
- Loopback plugin only works on 'lo' interface
- Update README, add loopback plugin config
- note script dependency on jq

Signed-off-by: Gabe Rosenhouse <grosenhouse@pivotal.io>
9 years agoAdds ginkgo / gomega as a dependency
Zachary Gershman [Thu, 11 Feb 2016 00:30:23 +0000 (16:30 -0800)]
Adds ginkgo / gomega as a dependency

9 years agoMerge pull request #135 from achanda/travis
Stefan Junker [Thu, 25 Feb 2016 22:00:00 +0000 (23:00 +0100)]
Merge pull request #135 from achanda/travis

Tweak the travis file

9 years agoTweak the travis file
Abhishek Chanda [Thu, 25 Feb 2016 06:32:08 +0000 (22:32 -0800)]
Tweak the travis file

- Build against more versions of Go
- Explicitely specify go versions

9 years agoMerge pull request #132 from steveeJ/scripts
Stefan Junker [Wed, 24 Feb 2016 17:28:47 +0000 (18:28 +0100)]
Merge pull request #132 from steveeJ/scripts

scripts: add DEBUG option

9 years agoMerge pull request #117 from kinvolk/alban/net-tuning
Stefan Junker [Wed, 24 Feb 2016 17:12:18 +0000 (18:12 +0100)]
Merge pull request #117 from kinvolk/alban/net-tuning

new plugin: tuning

9 years agoscripts: add DEBUG option
Stefan Junker [Tue, 23 Feb 2016 18:22:13 +0000 (19:22 +0100)]
scripts: add DEBUG option

9 years agoMerge pull request #107 from aanm/pretty-result
Stefan Junker [Fri, 19 Feb 2016 17:46:55 +0000 (18:46 +0100)]
Merge pull request #107 from aanm/pretty-result

added the String method to Result type

9 years agoadded the String method to Result type
André Martins [Sun, 31 Jan 2016 03:18:33 +0000 (03:18 +0000)]
added the String method to Result type

Signed-off-by: André Martins <aanm90@gmail.com>
9 years agonew plugin: tuning
Alban Crequy [Mon, 8 Feb 2016 22:28:15 +0000 (23:28 +0100)]
new plugin: tuning

Allow users to tune net network parameters such as somaxconn.

With this patch, users can add a new network configuration:

> {
>   "name": "mytuning",
>   "type": "tuning",
>   "sysctl": {
>           "net.core.somaxconn": "500"
>   }
> }

The value /proc/sys/net/core/somaxconn will be set to 500 in the network
namespace but will remain unchanged on the host.

Only sysctl parameters that belong to the network subsystem can be
modified.

Related to: https://github.com/coreos/rkt/pull/2140

9 years agoMerge pull request #108 from aanm/fix-ip-json-tag
Stefan Junker [Thu, 18 Feb 2016 13:12:20 +0000 (14:12 +0100)]
Merge pull request #108 from aanm/fix-ip-json-tag

fixed ipam host-local IP json tag

9 years agoBetter error message when plugin cannot be found
Zachary Gershman [Wed, 10 Feb 2016 21:42:10 +0000 (13:42 -0800)]
Better error message when plugin cannot be found

9 years agoMerge pull request #119 from jonboulle/master
Stefan Junker [Wed, 10 Feb 2016 14:54:58 +0000 (15:54 +0100)]
Merge pull request #119 from jonboulle/master

MAINTAINERS: remove Eugene from list

9 years agoMAINTAINERS: remove Eugene from list
Jonathan Boulle [Wed, 10 Feb 2016 14:51:11 +0000 (15:51 +0100)]
MAINTAINERS: remove Eugene from list

Eugene is no longer with CoreOS or actively involved with CNI, so remove
him from the current list of maintainers. He'll be gladly welcomed back
if he decides to rejoin the project.

9 years agofixed ipam host-local IP json tag
André Martins [Sun, 31 Jan 2016 03:14:33 +0000 (03:14 +0000)]
fixed ipam host-local IP json tag

Signed-off-by: André Martins <aanm90@gmail.com>
9 years agoMerge pull request #105 from steveeJ/scripts
Stefan Junker [Fri, 29 Jan 2016 10:20:55 +0000 (11:20 +0100)]
Merge pull request #105 from steveeJ/scripts

script/priv-net-run: improve shebang compatibility

9 years agoscript/priv-net-run: improve shebang compatibility
Stefan Junker [Fri, 29 Jan 2016 10:17:40 +0000 (11:17 +0100)]
script/priv-net-run: improve shebang compatibility

9 years agoMerge pull request #103 from steveeJ/dns
Stefan Junker [Fri, 29 Jan 2016 10:16:50 +0000 (11:16 +0100)]
Merge pull request #103 from steveeJ/dns

*: DNS information as dictionary, adding domain, search domains and options

9 years ago*: reflect SPEC's DNS changes in implementation
Stefan Junker [Wed, 27 Jan 2016 11:12:16 +0000 (12:12 +0100)]
*: reflect SPEC's DNS changes in implementation

* DNS is now a type which will result in a JSON dictionary in
  configurations and results
* Minor refactoring, making use of type embedding

9 years agodocs/ptp: update example and DNS description
Stefan Junker [Wed, 27 Jan 2016 11:10:53 +0000 (12:10 +0100)]
docs/ptp: update example and DNS description

9 years agoSPEC: DNS information as dictionary, adding domain, search domains, options
Stefan Junker [Wed, 27 Jan 2016 10:58:36 +0000 (11:58 +0100)]
SPEC: DNS information as dictionary, adding domain, search domains, options

9 years agoMerge pull request #104 from dcbw/revendor-go-iptables
Jonathan Boulle [Wed, 27 Jan 2016 20:18:44 +0000 (21:18 +0100)]
Merge pull request #104 from dcbw/revendor-go-iptables

Revendor go-iptables to get --wait behavior

9 years agoRevendor go-iptables to get --wait behavior
Dan Williams [Wed, 27 Jan 2016 19:56:53 +0000 (13:56 -0600)]
Revendor go-iptables to get --wait behavior

9 years agoMerge pull request #102 from steveeJ/scripts
Stefan Junker [Wed, 27 Jan 2016 10:14:57 +0000 (11:14 +0100)]
Merge pull request #102 from steveeJ/scripts

scripts/exec-plugins: print plugin results if DEBUG>0

9 years agoscripts/priv-net-run: print plugin results if DEBUG>0
Stefan Junker [Wed, 27 Jan 2016 09:58:01 +0000 (10:58 +0100)]
scripts/priv-net-run: print plugin results if DEBUG>0

9 years agoMerge pull request #101 from steveeJ/shebangs
Stefan Junker [Wed, 27 Jan 2016 09:51:32 +0000 (10:51 +0100)]
Merge pull request #101 from steveeJ/shebangs

scripts: improve shebang compatibility

9 years agoscripts: improve shebang compatibility
Stefan Junker [Wed, 27 Jan 2016 09:25:53 +0000 (10:25 +0100)]
scripts: improve shebang compatibility

9 years agoMerge pull request #99 from kinvolk/alban/dns-config
Stefan Junker [Wed, 27 Jan 2016 07:49:16 +0000 (08:49 +0100)]
Merge pull request #99 from kinvolk/alban/dns-config

*: add "dns" field to the configuration

9 years ago*: add "dns" field to the configuration
Alban Crequy [Tue, 26 Jan 2016 17:54:56 +0000 (18:54 +0100)]
*: add "dns" field to the configuration

appc/cni#76 added a "dns" field in the result JSON. But before this
patch, the plugins had no way of knowing which name server to return.

There could be two ways of knowing which name server to return:
1. add it as an extra argument ("CNI_ARGS")
2. add it in the network configuration as a convenience (received via
   stdin)

I chose the second way because it is easier. In the case of rkt, it
means the user could just add the DNS name servers in
/etc/rkt/net.d/mynetwork.conf.

9 years agoMerge pull request #98 from apcera/remove-addif
Jonathan Boulle [Fri, 22 Jan 2016 19:33:22 +0000 (20:33 +0100)]
Merge pull request #98 from apcera/remove-addif

spec: Removed reference to unsupported addIf attribute

9 years agospec: Removed reference to unsupported addIf attribute
Ken Robertson [Fri, 22 Jan 2016 17:36:03 +0000 (09:36 -0800)]
spec: Removed reference to unsupported addIf attribute

Removes the "addIf" attribute from the example of a bridge network
definition. This doesn't appear to exist in the implementation.

10 years agoMerge pull request #92 from ChengTiesheng/patch-1
Jonathan Boulle [Wed, 6 Jan 2016 17:08:25 +0000 (18:08 +0100)]
Merge pull request #92 from ChengTiesheng/patch-1

Update README.md

10 years agoUpdate README.md
Tiesheng [Wed, 6 Jan 2016 08:25:02 +0000 (16:25 +0800)]
Update README.md

Highlight bash/shell code in markdown for readability.

Signed-off-by: chengtiesheng <chengtiesheng@huawei.com>
10 years agoMerge pull request #91 from tomdee/patch-1
Stefan Junker [Tue, 5 Jan 2016 08:05:09 +0000 (09:05 +0100)]
Merge pull request #91 from tomdee/patch-1

Fix docker example in README.md

10 years agoUpdate README.md
Tom Denham [Tue, 5 Jan 2016 01:06:30 +0000 (17:06 -0800)]
Update README.md

No need for full path to ifconfig (and the given path doesn't work...)

10 years agoMerge pull request #90 from dgonyeo/master
Jonathan Boulle [Wed, 16 Dec 2015 21:46:05 +0000 (22:46 +0100)]
Merge pull request #90 from dgonyeo/master

pkg/ip: fix typo in error message, s/iptabes/iptables/

10 years agopkg/ip: fix typo in error message, s/iptabes/iptables/
Derek Gonyeo [Wed, 16 Dec 2015 21:20:19 +0000 (13:20 -0800)]
pkg/ip: fix typo in error message, s/iptabes/iptables/

10 years agoMerge pull request #80 from eyakubovich/add-version
Eugene Yakubovich [Wed, 9 Dec 2015 21:59:47 +0000 (13:59 -0800)]
Merge pull request #80 from eyakubovich/add-version

spec: add cniVersion to results and config

10 years agospec: add cniVersion to results and config
Eugene Yakubovich [Tue, 17 Nov 2015 00:07:15 +0000 (16:07 -0800)]
spec: add cniVersion to results and config

Version all artifacts using semantic versioning
so that plugins and container runtimes coded against
different versions of the spec can interoperate.

Fixes #44

10 years agoMerge pull request #78 from steveeJ/improve-errormsg-missing-subnet
Stefan Junker [Mon, 30 Nov 2015 19:56:25 +0000 (20:56 +0100)]
Merge pull request #78 from steveeJ/improve-errormsg-missing-subnet

host-local: detect missing subnet and error out

10 years agohost-local: detect missing subnet and error out
Stefan Junker [Thu, 12 Nov 2015 19:00:48 +0000 (20:00 +0100)]
host-local: detect missing subnet and error out

10 years agoMerge pull request #82 from steveeJ/dhcp-linkfix
Eugene Yakubovich [Fri, 20 Nov 2015 20:18:18 +0000 (12:18 -0800)]
Merge pull request #82 from steveeJ/dhcp-linkfix

dhcp: detect if link is down and attempt to set up

10 years agodhcp: detect if link is down and attempt to set up
Stefan Junker [Thu, 19 Nov 2015 10:08:04 +0000 (11:08 +0100)]
dhcp: detect if link is down and attempt to set up

With this we still get the "network is down" error, but after the 2nd
retry the interface is up and the dhcp request works.

10 years agoMerge pull request #76 from eyakubovich/dns
Eugene Yakubovich [Wed, 11 Nov 2015 00:59:31 +0000 (16:59 -0800)]
Merge pull request #76 from eyakubovich/dns

spec: add "dns" field to the result JSON

10 years agospec: add "dns" field to the result JSON
Eugene Yakubovich [Wed, 4 Nov 2015 19:31:35 +0000 (11:31 -0800)]
spec: add "dns" field to the result JSON

This adds an ability for networks to communicate
about the DNS nameservers they know about to the
container runtime.

Fixes #67

10 years agoMerge pull request #73 from eyakubovich/flannel-fix
Eugene Yakubovich [Thu, 8 Oct 2015 01:03:54 +0000 (18:03 -0700)]
Merge pull request #73 from eyakubovich/flannel-fix

flannel: doc fix and check for missing subnet.env fields

10 years agoflannel: doc fix and check for missing subnet.env fields
Eugene Yakubovich [Wed, 7 Oct 2015 22:11:54 +0000 (15:11 -0700)]
flannel: doc fix and check for missing subnet.env fields

- Document that flannel outputs FLANNEL_NETWORK b/c we use it
- Check and error out if expecited fields are missing in subnetEnv file

Fixes #72

10 years agoMerge pull request #71 from jonboulle/master
Michael Bridgen [Mon, 5 Oct 2015 11:10:56 +0000 (12:10 +0100)]
Merge pull request #71 from jonboulle/master

README/CONTRIBUTING: mention cni-dev@ list

10 years agoREADME/CONTRIBUTING: mention cni-dev@ list
Jonathan Boulle [Thu, 1 Oct 2015 19:43:43 +0000 (12:43 -0700)]
README/CONTRIBUTING: mention cni-dev@ list

10 years agoMerge pull request #69 from eyakubovich/err-msgs
Eugene Yakubovich [Wed, 30 Sep 2015 18:56:56 +0000 (11:56 -0700)]
Merge pull request #69 from eyakubovich/err-msgs

Route del would fail due to wrong scope; better errors

10 years agoMerge pull request #70 from eyakubovich/copyright
Eugene Yakubovich [Wed, 30 Sep 2015 18:03:46 +0000 (11:03 -0700)]
Merge pull request #70 from eyakubovich/copyright

Change copyright from CoreOS to CNI authors

10 years agoChange copyright from CoreOS to CNI authors
Eugene Yakubovich [Tue, 29 Sep 2015 18:51:33 +0000 (11:51 -0700)]
Change copyright from CoreOS to CNI authors

CNI is developed by more than just CoreOS, Inc
and the copyright is retained by all CNI
contributors (for their respective contributed code).

10 years agoRoute del would fail due to wrong scope; better errors
Eugene Yakubovich [Tue, 29 Sep 2015 18:27:49 +0000 (11:27 -0700)]
Route del would fail due to wrong scope; better errors

In some cases the route deletion would fail due to wrong
scope. It should be NOWHERE when deleting (per iproute2).
This also adds more verbose error messages.

10 years agoMerge pull request #65 from steveeJ/fix-veth-setup
Stefan Junker [Thu, 24 Sep 2015 19:53:54 +0000 (21:53 +0200)]
Merge pull request #65 from steveeJ/fix-veth-setup

Fix veth setup

Fixes #61 #64

10 years agolink: switch to host netns to set up host veth end
Stefan Junker [Thu, 24 Sep 2015 16:27:41 +0000 (18:27 +0200)]
link: switch to host netns to set up host veth end

10 years agoRevert "plugins/ptp: allow host veth to be UP"
Stefan Junker [Thu, 24 Sep 2015 16:28:14 +0000 (18:28 +0200)]
Revert "plugins/ptp: allow host veth to be UP"

This reverts commit 231d2d5a27f3ba54219c3f0b1c8ef2c5dab4faaf.

10 years agoMerge pull request #63 from steveeJ/no-host-local-ptp
Stefan Junker [Thu, 24 Sep 2015 11:10:47 +0000 (13:10 +0200)]
Merge pull request #63 from steveeJ/no-host-local-ptp

Merge host-local and host-local-ptp

10 years agoplugins/ptp: allow host veth to be UP
Stefan Junker [Wed, 23 Sep 2015 09:03:22 +0000 (11:03 +0200)]
plugins/ptp: allow host veth to be UP

10 years agoupdate ptp docs to reflect changes in plugin
Stefan Junker [Wed, 23 Sep 2015 20:11:25 +0000 (22:11 +0200)]
update ptp docs to reflect changes in plugin

10 years agoremove host-local-ptp plugin
Eugene Yakubovich [Thu, 17 Sep 2015 21:56:13 +0000 (14:56 -0700)]
remove host-local-ptp plugin

10 years agoUse single IP on the host for ptp veths
Eugene Yakubovich [Thu, 17 Sep 2015 18:49:21 +0000 (11:49 -0700)]
Use single IP on the host for ptp veths

Instead of allocating a /31 for each container,
use the same IP on the host side for all veths.
This is very similar how real point-to-point
devices work (using donor IPs).

10 years agorevendoring netlink
Eugene Yakubovich [Thu, 17 Sep 2015 18:51:14 +0000 (11:51 -0700)]
revendoring netlink

10 years agoMerge pull request #60 from eyakubovich/fix-plugin-del
Michael Bridgen [Tue, 22 Sep 2015 15:39:59 +0000 (16:39 +0100)]
Merge pull request #60 from eyakubovich/fix-plugin-del

bug fix: exec of DEL cmd caused JSON decode error

10 years agobug fix: exec of DEL cmd caused JSON decode error
Eugene Yakubovich [Fri, 18 Sep 2015 17:30:10 +0000 (10:30 -0700)]
bug fix: exec of DEL cmd caused JSON decode error

When plugin is executed with a DEL command, it does not
print result to stdout unless there is an error. Therefore
it stdout bytes should not be passed to json.Unmarshal.

10 years agoMerge pull request #59 from squaremo/factor-out-libcni
Michael Bridgen [Wed, 16 Sep 2015 23:06:54 +0000 (00:06 +0100)]
Merge pull request #59 from squaremo/factor-out-libcni

Factor an API out into a module

10 years agoFactor an API out into a module
Michael Bridgen [Fri, 7 Aug 2015 15:27:52 +0000 (16:27 +0100)]
Factor an API out into a module

This takes some of the machinery from CNI and from the rkt networking
code, and turns it into a library that can be linked into go apps.

Included is an example command-line application that uses the library,
called `cnitool`.

Other headline changes:

 * Plugin exec'ing is factored out

The motivation here is to factor out the protocol for invoking
plugins. To that end, a generalisation of the code from api.go and
pkg/plugin/ipam.go goes into pkg/invoke/exec.go.

 * Move argument-handling and conf-loading into public API

The fact that the arguments get turned into an environment for the
plugin is incidental to the API; so, provide a way of supplying them
as a struct or saying "just use the same arguments as I got" (the
latter is for IPAM plugins).

10 years agoMerge pull request #58 from steveeJ/remove-ipmasq-ifneedbe
Stefan Junker [Thu, 10 Sep 2015 20:08:57 +0000 (22:08 +0200)]
Merge pull request #58 from steveeJ/remove-ipmasq-ifneedbe

ipvlan/macvlan: remove ipMasq related code

10 years agoipvlan/macvlan: remove ipMasq related code
Stefan Junker [Wed, 9 Sep 2015 12:02:51 +0000 (14:02 +0200)]
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.