1649 Commits

Author SHA1 Message Date
Stefan Junker
e72674949e Merge pull request #156 from zachgersh/vendor
Moves to go team vendoring solution
2016-03-17 10:02:30 +01:00
Zach Gershman
a3038a5bec Merge pull request #157 from achanda/vet
Fix govet warnings
2016-03-16 17:01:57 -07:00
Zachary Gershman
72eddd1cf1 Let go tip fail, add vendor flag for 1.5 2016-03-16 17:00:51 -07:00
Abhishek Chanda
9b2f3380c1 Fix govet warnings 2016-03-16 16:25:41 -07:00
Zachary Gershman
48ff0e472a Moves to official vendoring solution 2016-03-16 08:38:20 -07:00
Zach Gershman
d19044896e Merge pull request #154 from rosenhouse/withnetns-errors
WithNetNS restores original namespace when callback errors
2016-03-15 08:39:01 -07:00
Gabe Rosenhouse
ca978caee7 Update docstring on WithNetNS 2016-03-15 08:37:00 -07:00
Gabe Rosenhouse
2251ee1d0c Update docstring on WithNetNS 2016-03-15 08:37:00 -07:00
Gabe Rosenhouse
b99854d124 WithNetNS restores original namespace when callback errors
- adds test coverage of WithNetNS in BDD-style
2016-03-15 01:51:58 -07:00
Gabe Rosenhouse
9356e23554 WithNetNS restores original namespace when callback errors
- adds test coverage of WithNetNS in BDD-style
2016-03-15 01:51:58 -07:00
Zach Gershman
2b6448f487 Merge pull request #146 from achanda/trusty
Use Ubuntu Trusty in travis
2016-03-14 17:42:03 -07:00
Zach Gershman
78337dcc42 Merge pull request #153 from steveeJ/maintainer-add-zach
MAINTAINERS: welcome Zach!
2016-03-14 15:52:21 -07:00
Stefan Junker
2511a57cb4 MAINTAINERS: welcome Zach!
We are pleased to welcome Zach on board as CNI maintainer.
Happy collaboration!
2016-03-14 22:56:25 +01:00
Stefan Junker
d497d6069a Merge pull request #148 from steveeJ/coverage-batches
travis & README: add coveralls coverage report
2016-03-09 17:30:41 +01:00
Stefan Junker
c1ee5d00df travis & README: add coveralls coverage report
Also, don't use sudo for the entire test script
2016-03-05 19:07:31 +01:00
Stefan Junker
cde7088cbe Merge pull request #144 from squaremo/rename-delegate-execs
Add invoke.Delegate{Add,Del} for use by meta-plugins
2016-03-04 13:20:35 +01:00
Michael Bridgen
05683bf11d 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.
2016-03-04 11:01:22 +00:00
Michael Bridgen
719a1db54b 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.
2016-03-04 11:01:22 +00:00
Stefan Junker
36c6bcd106 Merge pull request #142 from steveeJ/fix-loopback-result
Fix loopback result
2016-03-03 09:03:51 +01:00
Abhishek Chanda
230a555359 Use Ubuntu Trusty in travis
This boots faster
2016-03-02 20:00:11 -08:00
Stefan Junker
2b278529e5 Merge pull request #143 from zachgersh/more-tests
More tests
2016-03-02 19:01:13 +01:00
Stefan Junker
4a5426b77a tests: loopback DEL 2016-03-02 17:56:44 +01:00
zachgersh
f48bd43d8c Adds travis badge, now we have more tests 2016-03-02 11:43:27 -05:00
zachgersh
f3f999c20a Make sure invoke tests are running 2016-03-02 11:38:33 -05:00
Stefan Junker
80ab40470c tests: loopback stdout must be JSON 2016-03-02 15:27:05 +01:00
Stefan Junker
52be8aa615 plugins/loopback: take lo down on CmdDel 2016-03-02 15:27:05 +01:00
Stefan Junker
e282f6939d plugins/loopback: return empty result
This is needed to conform to the specification and allow successful
unmarshalling in the invoker.
2016-03-02 15:27:00 +01:00
Stefan Junker
e2673df403 Merge pull request #120 from zachgersh/find-better-error
Better error messages when plugin is not found
2016-03-02 11:14:50 +01:00
Stefan Junker
c44bc010ab Merge pull request #120 from zachgersh/find-better-error
Better error messages when plugin is not found
2016-03-02 11:14:50 +01:00
Stefan Junker
68259e3388 Merge pull request #121 from zachgersh/loopback-plugin
Loopback plugin
2016-03-02 09:32:01 +01:00
zachgersh
1e3d680d13 Handle namespaces with care
- After creating new netns, switch back to main netns
- Lock thread during test and test setup
2016-02-29 12:29:06 -05:00
Zachary Gershman
2708bdf2f5 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>
2016-02-29 12:29:06 -05:00
Zachary Gershman
ebd5be8475 Adds ginkgo / gomega as a dependency 2016-02-29 12:27:11 -05:00
Stefan Junker
67f6672414 Merge pull request #135 from achanda/travis
Tweak the travis file
2016-02-25 23:00:00 +01:00
Abhishek Chanda
c5f7cc8501 Tweak the travis file
- Build against more versions of Go
- Explicitely specify go versions
2016-02-24 22:32:08 -08:00
Stefan Junker
b7ff8ab158 Merge pull request #132 from steveeJ/scripts
scripts: add DEBUG option
2016-02-24 18:28:47 +01:00
Stefan Junker
1461909bcd Merge pull request #117 from kinvolk/alban/net-tuning
new plugin: tuning
2016-02-24 18:12:18 +01:00
Stefan Junker
06ea8c1e1f scripts: add DEBUG option 2016-02-23 19:22:48 +01:00
Stefan Junker
224ac412da Merge pull request #107 from aanm/pretty-result
added the String method to Result type
2016-02-19 18:46:55 +01:00
André Martins
d2af995349 added the String method to Result type
Signed-off-by: André Martins <aanm90@gmail.com>
2016-02-19 17:40:46 +00:00
André Martins
7b53bb9455 added the String method to Result type
Signed-off-by: André Martins <aanm90@gmail.com>
2016-02-19 17:40:46 +00:00
Alban Crequy
0b6ad716e8 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
2016-02-18 15:29:12 +01:00
Alban Crequy
f49145d5ff 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
2016-02-18 15:29:12 +01:00
Stefan Junker
48849bd3e3 Merge pull request #108 from aanm/fix-ip-json-tag
fixed ipam host-local IP json tag
2016-02-18 14:12:20 +01:00
Zachary Gershman
3382b459a7 Better error message when plugin cannot be found 2016-02-10 13:42:10 -08:00
Zachary Gershman
290717d6fe Better error message when plugin cannot be found 2016-02-10 13:42:10 -08:00
Stefan Junker
2d9695e976 Merge pull request #119 from jonboulle/master
MAINTAINERS: remove Eugene from list
2016-02-10 15:54:58 +01:00
Jonathan Boulle
2ac72cbb12 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.
2016-02-10 15:51:11 +01:00
André Martins
33b2de44af fixed ipam host-local IP json tag
Signed-off-by: André Martins <aanm90@gmail.com>
2016-01-31 03:14:53 +00:00
Stefan Junker
f04661aca1 Merge pull request #105 from steveeJ/scripts
script/priv-net-run: improve shebang compatibility
2016-01-29 11:20:55 +01:00