Gabe Rosenhouse
deb4466041
versioning: adds tooling to compile a program against a given old CNI version
...
Allows us to write tests that cover interactions between components of
differing versions
2016-09-02 16:02:02 -04:00
Gabe Rosenhouse
dea1c6e44d
pkg/invoke: refactor plugin exec and backfill unit tests
2016-09-02 15:59:25 -04:00
Gabe Rosenhouse
adf28a84c6
versioning: document meaning of 'Legacy' version support
2016-09-02 11:26:17 -04:00
Gabe Rosenhouse
536cb5b99b
versioning: plugins report a list of supported versions
...
Further progress on versioning support (Issue #266 ).
Bump CNI spec version to 0.3.0
2016-09-02 11:26:17 -04:00
Gabe Rosenhouse
c5e39a87f7
Merge pull request #293 from rosenhouse/backfill-invoke-exec-tests
...
Backfill tests for plugin execution
2016-08-31 20:49:08 -04:00
Dan Williams
e0ea82b229
Merge pull request #290 from asridharan/dcos
...
Fixed the check for network namespace path.
2016-08-31 18:19:02 -05:00
Avinash Sridharan
7281d5792a
pkg/ns: fixed the check for network namespace path.
...
The expectation on older kernels (< 3.19) was to have the network
namespace always be a directory. This is not true if the network
namespace is bind mounted to a file, and will make the plugin fail
erroneously in such cases. The fix is to remove this assumption
completely and just do a basic check on the file system types being
returned.
Fixes #288
2016-08-31 21:41:00 +00:00
Dan Williams
4d77bc177c
Merge pull request #291 from tomdee/SetupVeth
...
pkg/ip: Ensure that SetupVeth returns correct hostVeth
2016-08-31 16:32:09 -05:00
Tom Denham
726c6b4578
pkg/ip: Ensure that SetupVeth returns correct hostVeth
...
The veth is moved from the container NS to the host NS.
This is handled by the code that sets the link to UP but the wrong
hostVeth is returned to the calling code.
2016-08-31 14:17:25 -07:00
Gabe Rosenhouse
d3ecadb860
invoke: backfill tests for plugin execution
2016-08-30 23:52:47 -04:00
Gabe Rosenhouse
9d5e6e60e7
Merge pull request #241 from luxas/add_platforms
...
Add arm64 and ppc64le as new platforms
2016-08-13 15:11:28 -07:00
Lucas Käldström
39f8436a8b
release: Release binaries for arm, arm64 and ppc64le too
...
Modify the releasing script to cross-compile for the new architectures, but also keep backwards-compability
ref #209
2016-08-13 12:45:04 +03:00
Lucas Käldström
21d25959ee
travis: Cross-compile for arm, arm64 and ppc64le on every build
...
Cross-compile cni for arm, arm64 and ppc64le with go1.6 only
Allow go tip to fail
Set fast_finish to true, which means travis will instantly return build failure when any of the required builds fail
ref #209
2016-08-13 12:44:45 +03:00
Lucas Käldström
fc58b79b45
build: Update the build script to make it possible to build for other architectures
...
This makes it possible to cross-compile cni like so:
$ GOARCH=arm ./build
$ GOARCH=arm64 ./build
$ GOARCH=ppc64le ./build
ref #209
2016-08-13 12:44:28 +03:00
Lucas Käldström
488db88fd1
vendor: Bump golang.org/x/sys/unix to a newer version
...
The current vendor of sys/unix is really old, and doesn't work on arm64 and ppc64le
Updating to the latest version might also fix other issues
ref #209
2016-08-13 12:44:04 +03:00
Tom Denham
349d66d51c
Merge pull request #267 from rosenhouse/version-cmd
...
Adds VERSION command
2016-08-12 15:06:22 -07:00
Tom Denham
5a67f5d6fb
Merge pull request #273 from zreigz/reconfigure-bridge-ip
...
Reconfigure bridge IP address
2016-08-12 15:04:22 -07:00
Tom Denham
60bb795c2e
Merge pull request #274 from lukasredynk/update_netlink
...
Update of netlink version
2016-08-12 13:07:26 -07:00
Tom Denham
113dfd61bd
Merge pull request #280 from prateekgogia/bug-fix-155
...
pkg/ip: Return correct error if container name provided exists, and test cases
2016-08-12 13:04:49 -07:00
Prateek Gogia
ad8a052dd3
pkg/ip: Return correct error if container name provided exists, and test cases
...
If interface name for a container provided by a user is already present,
Veth creation fails with incorrect error.
If os.IsExist error is returned by makeVethPair:
* Check for peer name, if exists generate another random peer name,
* else, IsExist error is due to container interface present, return error.
Fixes #155
2016-08-11 18:51:03 +00:00
Lukasz Zajaczkowski
8cb3a9323a
libcni: add util function InjectConf
2016-08-08 13:21:25 +02:00
Stefan Junker
7c579af789
Merge pull request #277 from steveeJ/test-allocator-reserveip
...
ipam/host-local/allocator tests: cover requested IP
2016-08-02 14:43:43 -07:00
Lukasz Zajaczkowski
ee64ac74bc
documentation: add description for forceAddress parameter
2016-08-02 07:33:44 +02:00
Lukasz Zajaczkowski
d09b18dac4
plugins: reconfigure bridge IP address
...
Add possibility to reconfigure bridge IP address when there is a new value.
New boolean flag added to net configuration to force IP change if it is need.
Otherwise code behaves as previously and throws error
2016-08-02 07:33:17 +02:00
Stefan Junker
054fa9e42d
ipam/host-local/allocator tests: cover requested IP
...
Further:
* improve error handling
2016-08-01 18:13:15 -07:00
Stefan Junker
f5ead7969a
Merge pull request #254 from steveeJ/ip-based-macaddr
...
pkg/ipam: IP based macaddr
2016-08-01 17:43:49 -07:00
Stefan Junker
c0ac3913a1
pkg/utils/hwaddr tests: cover v4 in v6 addr
2016-08-01 16:50:40 -07:00
Lukas Redynk
35ce5d68e0
Update of netlink version
...
This is required for
https://github.com/containernetworking/cni/issues/251 because version of
netlink used doesn't support creating tap devices.
2016-08-01 14:04:03 +02:00
Tom Denham
c1ff202179
Merge pull request #272 from rosenhouse/types-of-users
...
README: distinguish between runtimes and plugins
2016-07-25 16:35:58 -07:00
Stefan Junker
5a52316ab5
plugins/{bridge,macvlan} test: ensure hardware addr
...
* bridge: Test the following interface's hardware address for the CNI specific
prefix:
- bridge with IP address
- container veth
* plugins/macvlan test: ensure hardware addr
2016-07-22 15:40:00 -07:00
Stefan Junker
f68cea27bc
pkg/ip link_test: ensure SetHWAddrByIP has an effect
2016-07-22 15:34:54 -07:00
Stefan Junker
55fd81f775
plugins/ptp: set the host veth hwaddr correctly
2016-07-22 15:34:54 -07:00
Stefan Junker
7d19c01818
pkg/ip: use iface name in SetHWAddrByIP
2016-07-22 15:34:53 -07:00
Stefan Junker
8e1c215116
pkg/ip tests: cover SetupVeth and DelLinkByName*
2016-07-22 15:34:53 -07:00
Stefan Junker
924b30b57d
plugins: set MAC addresses based on IP
...
This will give deterministic MAC addresses for all interfaces CNI
creates and manages the IP for:
* bridge: container veth and host bridge
* macvlan: container veth
* ptp: container veth and host veth
2016-07-22 15:34:53 -07:00
Stefan Junker
3a1354cff6
pkg/utils/hwaddr: migrate code from IPAM pkg
2016-07-22 15:18:38 -07:00
Stefan Junker
96867eae05
pkg/ipam{,test}: improve error handling and tests
...
* _suite.go and _test.go file should be in the same package, using the
_test package for that, which requires some fields and methods to be
exported
* Introduce error type for cleaner error handling
* test adaptions for error type checking
2016-07-22 15:17:22 -07:00
Minhan Xia
1c1424c472
add tests for generateHardwardAddr
2016-07-22 15:01:57 -07:00
Minhan Xia
b2e53181d1
configure mac address based on assigned ip
2016-07-22 14:57:52 -07:00
Gabe Rosenhouse
39a8fe4766
Merge pull request #270 from rosenhouse/integration-tests
...
Add integration tests of libcni
2016-07-22 13:36:20 -07:00
Gabe Rosenhouse
c657c61767
plugins: cleanup tests of no-op plugin
2016-07-22 13:30:55 -07:00
Gabe Rosenhouse
424a8b38cf
README: distinguish between runtimes and plugins
...
Adds a link to the 3rd party SR-IOV plugin.
2016-07-22 13:22:35 -07:00
Gabe Rosenhouse
dfd2c142ae
docs: fix tuning doc, correct the result json
...
it does not report the version, it never did
2016-07-21 13:06:05 -07:00
Gabe Rosenhouse
7bc96f05bb
spec: add version command and increment version to 0.2.0
2016-07-21 12:59:08 -07:00
Gabe Rosenhouse
0506bae8fc
spec: remove CNI_VERSION env var, was never been implemented
...
No one uses this, and it is causing confusion (see #150 )
2016-07-20 13:39:51 -07:00
Gabe Rosenhouse
bacdc3668d
libcni: add integration test coverage
2016-07-15 13:01:08 -07:00
Gabe Rosenhouse
5835c2bbb1
plugins: adds new no-op plugin that may be used as a test-double
...
Plugin can be configured to record all inputs and to respond with
arbitrary stdout or error message. Will support upcoming integration
testing.
2016-07-15 12:48:02 -07:00
Gabe Rosenhouse
7f098f7c4a
Merge pull request #269 from rosenhouse/skel-dependency-injection
...
Refactor skel with dependency injection
2016-07-15 12:45:18 -07:00
Gabe Rosenhouse
a2aff8c6a8
misc: fix up copyright dates
2016-07-14 16:09:27 -07:00
Tom Denham
f484990a00
Merge pull request #263 from feiskyer/ptp-test
...
plugins/main/ptp: add functional tests
2016-07-14 14:32:05 -06:00