Commit Graph

396 Commits

Author SHA1 Message Date
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
36c6bcd106 Merge pull request #142 from steveeJ/fix-loopback-result
Fix loopback result
2016-03-03 09:03:51 +01:00
230a555359 Use Ubuntu Trusty in travis
This boots faster
2016-03-02 20:00:11 -08:00
2b278529e5 Merge pull request #143 from zachgersh/more-tests
More tests
2016-03-02 19:01:13 +01:00
4a5426b77a tests: loopback DEL 2016-03-02 17:56:44 +01:00
f48bd43d8c Adds travis badge, now we have more tests 2016-03-02 11:43:27 -05:00
f3f999c20a Make sure invoke tests are running 2016-03-02 11:38:33 -05:00
80ab40470c tests: loopback stdout must be JSON 2016-03-02 15:27:05 +01:00
52be8aa615 plugins/loopback: take lo down on CmdDel 2016-03-02 15:27:05 +01:00
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
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
68259e3388 Merge pull request #121 from zachgersh/loopback-plugin
Loopback plugin
2016-03-02 09:32:01 +01:00
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
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
ebd5be8475 Adds ginkgo / gomega as a dependency 2016-02-29 12:27:11 -05:00
67f6672414 Merge pull request #135 from achanda/travis
Tweak the travis file
2016-02-25 23:00:00 +01:00
c5f7cc8501 Tweak the travis file
- Build against more versions of Go
- Explicitely specify go versions
2016-02-24 22:32:08 -08:00
b7ff8ab158 Merge pull request #132 from steveeJ/scripts
scripts: add DEBUG option
2016-02-24 18:28:47 +01:00
1461909bcd Merge pull request #117 from kinvolk/alban/net-tuning
new plugin: tuning
2016-02-24 18:12:18 +01:00
06ea8c1e1f scripts: add DEBUG option 2016-02-23 19:22:48 +01:00
224ac412da Merge pull request #107 from aanm/pretty-result
added the String method to Result type
2016-02-19 18:46:55 +01:00
7b53bb9455 added the String method to Result type
Signed-off-by: André Martins <aanm90@gmail.com>
2016-02-19 17:40:46 +00:00
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
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
290717d6fe Better error message when plugin cannot be found 2016-02-10 13:42:10 -08:00
2d9695e976 Merge pull request #119 from jonboulle/master
MAINTAINERS: remove Eugene from list
2016-02-10 15:54:58 +01:00
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
33b2de44af fixed ipam host-local IP json tag
Signed-off-by: André Martins <aanm90@gmail.com>
2016-01-31 03:14:53 +00:00
f04661aca1 Merge pull request #105 from steveeJ/scripts
script/priv-net-run: improve shebang compatibility
2016-01-29 11:20:55 +01:00
d5c56b8d42 script/priv-net-run: improve shebang compatibility 2016-01-29 11:17:55 +01:00
b589f29108 Merge pull request #103 from steveeJ/dns
*: DNS information as dictionary, adding domain, search domains and options
2016-01-29 11:16:50 +01:00
137dc8a673 *: 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
2016-01-29 10:39:28 +01:00
abb6ee1dd1 docs/ptp: update example and DNS description 2016-01-29 10:39:28 +01:00
092e8f5c4d SPEC: DNS information as dictionary, adding domain, search domains, options 2016-01-29 10:39:22 +01:00
09214926ea Merge pull request #104 from dcbw/revendor-go-iptables
Revendor go-iptables to get --wait behavior
2016-01-27 21:18:44 +01:00
6017d5c8b9 Revendor go-iptables to get --wait behavior 2016-01-27 13:56:53 -06:00
a4f8407150 Merge pull request #102 from steveeJ/scripts
scripts/exec-plugins: print plugin results if DEBUG>0
2016-01-27 11:14:57 +01:00
67e6f68343 scripts/priv-net-run: print plugin results if DEBUG>0 2016-01-27 10:58:01 +01:00
59f8bb361a Merge pull request #101 from steveeJ/shebangs
scripts: improve shebang compatibility
2016-01-27 10:51:32 +01:00
28d18d3e73 scripts: improve shebang compatibility 2016-01-27 10:31:16 +01:00
1da421150c Merge pull request #99 from kinvolk/alban/dns-config
*: add "dns" field to the configuration
2016-01-27 08:49:16 +01:00
2f9ef4adb7 *: 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.
2016-01-26 18:54:56 +01:00
03d4ba4ffb Merge pull request #98 from apcera/remove-addif
spec: Removed reference to unsupported addIf attribute
2016-01-22 20:33:22 +01:00
65060a0e14 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.
2016-01-22 10:45:05 -08:00
6fc3874d57 Merge pull request #92 from ChengTiesheng/patch-1
Update README.md
2016-01-06 18:08:25 +01:00
54286af90f Update README.md
Highlight bash/shell code in markdown for readability.

Signed-off-by: chengtiesheng <chengtiesheng@huawei.com>
2016-01-06 16:25:02 +08:00
4fcf18cb88 Merge pull request #91 from tomdee/patch-1
Fix docker example in README.md
2016-01-05 09:05:09 +01:00
0a289316d6 Update README.md
No need for full path to ifconfig (and the given path doesn't work...)
2016-01-04 17:06:30 -08:00
80f87ceb14 Merge pull request #90 from dgonyeo/master
pkg/ip: fix typo in error message, s/iptabes/iptables/
2015-12-16 22:46:05 +01:00
fd64ee6ade pkg/ip: fix typo in error message, s/iptabes/iptables/ 2015-12-16 13:20:19 -08:00