49 Commits

Author SHA1 Message Date
Bruce Ma
869d5ec873 pkg/ipam : use delegateArgs instead of env set/unset in ipam.ExecDel
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-06-18 21:02:01 +08:00
Casey Callendrello
0950a3607b
Merge pull request #279 from mars1024/bugfix/ipmasq_source
change source of ipmasq rule from ipn to ip
2019-05-10 13:40:17 +02:00
Michael Cambria
02ccf1ef9b Have ipam.ExecDel set CNI_COMMAND to DEL 2019-05-08 11:50:28 -04:00
Nathan Gieseker
5a78120e24 Windows: case insensitive compare for ids 2019-05-02 19:54:39 -07:00
Bruce Ma
7efec9ea46 change source of ipmasq rule from ipn to ip 2019-04-25 15:59:02 +08:00
nagiesek
635968aaff
Merge branch 'master' into noErrorEndpointNotFound 2019-04-17 23:04:04 -07:00
Nathan Gieseker
688a87a055 Windows: No error for no endpoint found On Del. Ipam clean-up on ADD failure.
We used to return error if no endpoint was found during delete. We now treat this as a success. If we fail during an add call, we now make a delete delegate call to the ipam to clean-up.
2019-04-17 08:33:10 -07:00
Casey Callendrello
72f2a1ffd4 plugins: correctly output build version, cosmetic cleanups
Now that libcni has the ability to print a version message, plumb it
through correctly.

While we're at it,
- fix import paths
- run gofmt
- add some more comments to sample
- add container runtime swappability for release
2019-04-15 16:52:07 +02:00
Dan Williams
18874aac7d
Merge pull request #264 from mccv1r0/add-check
Add CHECK support for linux plugins
2019-04-03 12:58:41 -05:00
Michael Cambria
74a2596573 Add check support for: bridge, ipvlan, macvlan, p2p, vlan and host-device main plugins
host-local and static ipam plugins
  tuning, bandwidth and portmap meta plugins

  Utility functions created for common PrevResult checking

  Fix windows build
2019-04-03 13:08:07 -04:00
Nathan Gieseker
b71e8db683 Windows: Add runtime DNS and del bug fix
This adds the dns capability for supplying a runtime dnsConfig from a CRI. It also includes a bug fix for removing an endpoint when no IPAM is supplied. Adds version dependency of 0.3.0. Mild updates to windows READMEs.
2019-03-12 20:56:11 -07:00
Nathan Gieseker
57b42a7b99 Windows: Adds HCS Calls and Bug Fixes
Move the windows plugin to use the Host Compute (v2) APIs, as well
as clean-up the code. Allows win-bridge to use either the old API or Host Compute (v2) api
depending on a conf parameter. Fixes a leaked endpoint issue on windows for the v1 flow, and
removes the hns/pkg from the linux test run.
2019-02-27 08:49:34 -08:00
JoeWrightss
f0208611ad Fix some spelling errors
Signed-off-by: JoeWrightss <zhoulin.xie@daocloud.io>
2018-12-29 21:26:28 +08:00
Michael Cambria
ddbf22f7f9 Vendor github.com/containernetworking/cni libcni and pkg file needed for CHECK
Update plugins/tests to deal with changes made to this vendor'ed code
2018-11-05 16:35:03 -05:00
Dan Williams
8a579a7fbc
Merge pull request #204 from mrostecki/always-check-err
Add missing error checks
2018-09-24 20:52:38 -05:00
MaiWJ
b56ca2fe45 Windows Support
Patch for https://github.com/containernetworking/plugins/pull/85

+ Windows cni plugins are added
   (*) win-bridge (hostgw)
   (*) win-overlay (vxlan)
+ Windows netconf unit test
+ Fix appveyor config to run the test
+ Build release support for windows plugins

Address comments

From:
    - https://github.com/containernetworking/plugins/pull/85
    - 0049c64e3f
2018-09-21 00:34:07 +08:00
Michal Rostecki
947a5881fc pkg/ns: Add missing error checks
Signed-off-by: Michal Rostecki <mrostecki@suse.de>
2018-09-20 11:05:15 +02:00
Michal Rostecki
26834c3e63 pkg/ip: Add missing error check
Signed-off-by: Michal Rostecki <mrostecki@suse.de>
2018-09-20 11:04:13 +02:00
Casey Callendrello
68b4efb405 plugins/* stub-out GET functions so plugins build with v0.7 2018-06-15 15:28:53 +02:00
Dan Williams
731298003c plugins/testutils: pass CNI_CONTAINERID to plugins in testcases
Recent CNI specification changes require the container ID on ADD/DEL,
which the testcases were not providing.  Fix that up so things work
when this repo gets CNI revendored.
2018-04-26 11:24:30 -05:00
Dan Williams
1df359a210
Merge pull request #144 from squeed/build-fixes
build: some small improvements; bump to go1.10
2018-04-25 10:41:32 -05:00
Casey Callendrello
aade7b93ee build: some small improvements; bump to go1.10
- bump to go 1.10
- Add a linker tag with the build version
- Remove fastbuild, go builds are cached now
- Use better ginkgo suite names
2018-04-12 16:59:51 +02:00
Dan Williams
bb1e8d10a7
Merge pull request #143 from containernetworking/v0.7
Merge v0.7.1 fix into master
2018-04-12 09:21:42 -05:00
Casey Callendrello
00b072dd0b pkg/ip: re-fetch the created link to return creation-time parameters
Fixes: #140
2018-04-11 15:04:38 +02:00
Casey Callendrello
a0eac8d7d9 pkg/ns: remove namespace creation (and move to testutils)
Namespace creation had an unergonomic interface and isn't used, except
for testing code. Remove it; downstream users should really be creating
their own namespaces
2018-04-03 18:56:25 +02:00
Gabe Rosenhouse
1fb94a4222
Merge pull request #96 from DennisDenuto/denuto/master
plugins/meta/bandwidth: traffic shaping plugin
2018-03-14 08:11:28 -07:00
Casey Callendrello
56989e2380
Merge pull request #124 from squeed/masq-del
pkg/ip: Tearing down ipmasq should be idempotent
2018-03-07 17:40:21 +01:00
DennisDenuto
b78e535055 plugins/meta/bandwith: traffic shaping plugin
Add chained plugin to add a tbf qdisc to shape ingress/egress traffic
2018-02-27 20:47:41 -08:00
Casey Callendrello
c850d4514d pkg/ip: Tearing down ipmasq should be idempotent 2018-02-21 15:38:16 +01:00
Gabe Rosenhouse
0536605966 pkg/ip: GetVethPeerIfindex: add basic test coverage 2018-02-17 16:10:19 -08:00
Dan Williams
b16633bbe9 pkg/ip: add GetVethPeerIfindex() 2018-02-17 15:42:10 -08:00
Ralf Nyren
08ec2995ba Explicitly enable IPv6 sysctl
If CNI is about to configure an IPv6 address, make sure IPv6 is not
disabled through the "disable_ipv6" sysctl setting.

This is a workaround for Docker 17.06 and later which sets
disable_ipv6=1 for all interfaces even if ipv6 is enabled in Docker.
2018-02-13 20:11:06 +01:00
Casey Callendrello
d228f980e1
Merge pull request #103 from alice02/fix/skip_settleaddress
pkg/ipam: Skip ip.SettleAddresses if only IPv4 is used
2018-01-22 12:07:41 +01:00
Shengjing Zhu
59f9976017 pkg/ip: don't write to /proc/sys if ipforward enabled
This enables setup in a container env like systemd nspawn
where /proc/sys is mouted as read only.

Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-01-18 01:52:49 +08:00
alice02
97664d8a6a pkg/ipam: Skip ip.SettleAddresses if only IPv4 is used
This change improves the performance of the ipam.ConfigureIface.
Some plugins are slow because of the ip.SettleAddress in ipam.ConfigureIface.
It seems to be only needed for IPv6, so should be skipped if only IPv4 is used.
2017-12-26 16:48:57 +09:00
Gabriel Rosenhouse
99f6be0319 Enable Windows CI (Appveyor)
- start list of linux_only plugins; ignore them when testing on Windows
- Isolate linux-only code by filename suffix
- Remove stub (NotImplemented) functions
- other misc. fixes for Windows compatibility
2017-11-10 08:09:29 -08:00
Dan Williams
449700f7ea pkg/ip: don't return error from DelLinkByNameAddr() if no addresses exist
For some reason no addresses on the interface returned an error, despite
having a testcase that explicitly tested for success.
2017-11-07 16:07:04 -06:00
Gabriel Rosenhouse
d8f2fd7a3c testing: move echosvr into testutils 2017-09-06 19:10:48 -07:00
Casey Callendrello
7a62515407 pkg/ip: Fix ipmasq teardown on v6-only interfaces 2017-09-06 20:02:41 +02:00
Casey Callendrello
a690f775ae Merge pull request #25 from squeed/ptp-v6
ptp: add ipv6 support
2017-07-05 17:30:23 +02:00
Casey Callendrello
3daee3214d ptp: add ipv6 support
* Wait for addresses to leave tentative state before setting routes
* Enable forwarding correctly
* Set up masquerading according to the active protocol
2017-06-30 12:06:57 +02:00
Dan Williams
0da6780449 pkg,plugins: update for Result struct Interface index changes
It's a pointer now, so we need to use the helper function to set
the field and also test for nil before accessing it.
2017-06-29 13:40:36 -05:00
Dan Williams
e2558a03bb Merge pull request #12 from squeed/host-local-multi
ipam/host-local: support multiple IP ranges
2017-06-14 21:55:30 -05:00
Bryan Boreham
45650feb32 Merge pull request #14 from rosenhouse/more-ns-warning-redux
pkg/ns readme: expand on danger of ns switching in long-lived programs
2017-06-14 16:18:26 +01:00
Casey Callendrello
2e9e87732f ipam/host-local: support multiple IP ranges
This change allows the host-local allocator to allocate multiple IPs.
This is intended to enable dual-stack, but is not limited to only two
subnets or separate address families.
2017-06-12 21:14:44 +02:00
Tobias Klauser
9c7aeff02c pkg/ns: use unix.Setns() instead of open coding it
Use unix.Setns() instead of manually re-implementing it using
unix.Syscall().
2017-06-08 14:48:58 +02:00
Gabe Rosenhouse
6f45630cc1 pkg/ns readme: expand on danger of ns switching in long-lived programs
- redux of https://github.com/containernetworking/cni/pull/331 since the
plugin/lib split
- added link to new blog post about this from Weave folks (thanks!)
2017-06-06 19:05:00 -07:00
Casey Callendrello
3c436520be move most of cni/pkg to plugins/pkg: delete code staying in cni/pkg
This moves the following packages to this repository:
* ip
* ipam
* ns
* testutils
* utils
2017-05-23 16:12:49 +02:00
Casey Callendrello
8b43e90949 Add 'pkg/' from commit 'a11be4d7596203874b742b6597caf255204c56c3'
git-subtree-dir: pkg
git-subtree-mainline: dcf7368eeab15e2affc6256f0bb1e84dd46a34de
git-subtree-split: a11be4d7596203874b742b6597caf255204c56c3
2017-05-19 19:43:02 +02:00