Gabe Rosenhouse [Fri, 2 Sep 2016 20:39:01 +0000 (16:39 -0400)]
invoke: better name and unit test coverage for GetVersionInfo
Gabe Rosenhouse [Fri, 2 Sep 2016 20:01:22 +0000 (16:01 -0400)]
invoke: correctly infer version for 0.1.0-vintage plugins
Older plugins return a known error when issued the VERSION command.
Capture this error and report it as a 0.1.0 version plugin.
Gabe Rosenhouse [Wed, 24 Aug 2016 05:57:00 +0000 (22:57 -0700)]
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
Gabe Rosenhouse [Fri, 2 Sep 2016 17:12:14 +0000 (13:12 -0400)]
pkg/invoke: refactor plugin exec and backfill unit tests
Gabe Rosenhouse [Mon, 29 Aug 2016 23:20:18 +0000 (19:20 -0400)]
versioning: document meaning of 'Legacy' version support
Gabe Rosenhouse [Mon, 22 Aug 2016 06:48:04 +0000 (23:48 -0700)]
versioning: plugins report a list of supported versions
Further progress on versioning support (Issue #266).
Bump CNI spec version to 0.3.0
Gabe Rosenhouse [Thu, 1 Sep 2016 00:49:08 +0000 (20:49 -0400)]
Merge pull request #293 from rosenhouse/backfill-invoke-exec-tests
Backfill tests for plugin execution
Dan Williams [Wed, 31 Aug 2016 23:19:02 +0000 (18:19 -0500)]
Merge pull request #290 from asridharan/dcos
Fixed the check for network namespace path.
Avinash Sridharan [Wed, 24 Aug 2016 23:49:50 +0000 (23:49 +0000)]
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
Dan Williams [Wed, 31 Aug 2016 21:32:09 +0000 (16:32 -0500)]
Merge pull request #291 from tomdee/SetupVeth
pkg/ip: Ensure that SetupVeth returns correct hostVeth
Tom Denham [Mon, 29 Aug 2016 21:10:36 +0000 (14:10 -0700)]
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.
Gabe Rosenhouse [Wed, 31 Aug 2016 03:52:47 +0000 (23:52 -0400)]
invoke: backfill tests for plugin execution
Gabe Rosenhouse [Sat, 13 Aug 2016 22:11:28 +0000 (15:11 -0700)]
Merge pull request #241 from luxas/add_platforms
Add arm64 and ppc64le as new platforms
Lucas Käldström [Sat, 13 Aug 2016 09:45:04 +0000 (12:45 +0300)]
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
Lucas Käldström [Sat, 13 Aug 2016 09:44:45 +0000 (12:44 +0300)]
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
Lucas Käldström [Sat, 13 Aug 2016 09:44:28 +0000 (12:44 +0300)]
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
Lucas Käldström [Sat, 13 Aug 2016 09:44:04 +0000 (12:44 +0300)]
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
Tom Denham [Fri, 12 Aug 2016 22:06:22 +0000 (15:06 -0700)]
Merge pull request #267 from rosenhouse/version-cmd
Adds VERSION command
Tom Denham [Fri, 12 Aug 2016 22:04:22 +0000 (15:04 -0700)]
Merge pull request #273 from zreigz/reconfigure-bridge-ip
Reconfigure bridge IP address
Tom Denham [Fri, 12 Aug 2016 20:07:26 +0000 (13:07 -0700)]
Merge pull request #274 from lukasredynk/update_netlink
Update of netlink version
Tom Denham [Fri, 12 Aug 2016 20:04:49 +0000 (13:04 -0700)]
Merge pull request #280 from prateekgogia/bug-fix-155
pkg/ip: Return correct error if container name provided exists, and test cases
Prateek Gogia [Sun, 7 Aug 2016 19:24:56 +0000 (19:24 +0000)]
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
Lukasz Zajaczkowski [Fri, 5 Aug 2016 08:45:58 +0000 (10:45 +0200)]
libcni: add util function InjectConf
Stefan Junker [Tue, 2 Aug 2016 21:43:43 +0000 (14:43 -0700)]
Merge pull request #277 from steveeJ/test-allocator-reserveip
ipam/host-local/allocator tests: cover requested IP
Lukasz Zajaczkowski [Mon, 1 Aug 2016 10:53:46 +0000 (12:53 +0200)]
documentation: add description for forceAddress parameter
Lukasz Zajaczkowski [Fri, 29 Jul 2016 11:02:32 +0000 (13:02 +0200)]
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
Stefan Junker [Tue, 2 Aug 2016 01:11:22 +0000 (18:11 -0700)]
ipam/host-local/allocator tests: cover requested IP
Further:
* improve error handling
Stefan Junker [Tue, 2 Aug 2016 00:43:49 +0000 (17:43 -0700)]
Merge pull request #254 from steveeJ/ip-based-macaddr
pkg/ipam: IP based macaddr
Stefan Junker [Mon, 1 Aug 2016 23:50:40 +0000 (16:50 -0700)]
pkg/utils/hwaddr tests: cover v4 in v6 addr
Lukas Redynk [Mon, 1 Aug 2016 12:04:03 +0000 (14:04 +0200)]
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.
Tom Denham [Mon, 25 Jul 2016 23:35:58 +0000 (16:35 -0700)]
Merge pull request #272 from rosenhouse/types-of-users
README: distinguish between runtimes and plugins
Stefan Junker [Wed, 29 Jun 2016 23:03:25 +0000 (16:03 -0700)]
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
Stefan Junker [Wed, 29 Jun 2016 19:13:37 +0000 (12:13 -0700)]
pkg/ip link_test: ensure SetHWAddrByIP has an effect
Stefan Junker [Wed, 29 Jun 2016 22:15:30 +0000 (15:15 -0700)]
plugins/ptp: set the host veth hwaddr correctly
Stefan Junker [Wed, 29 Jun 2016 19:13:05 +0000 (12:13 -0700)]
pkg/ip: use iface name in SetHWAddrByIP
Stefan Junker [Wed, 29 Jun 2016 02:52:08 +0000 (19:52 -0700)]
pkg/ip tests: cover SetupVeth and DelLinkByName*
Stefan Junker [Wed, 29 Jun 2016 00:46:17 +0000 (17:46 -0700)]
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
Stefan Junker [Tue, 28 Jun 2016 19:51:58 +0000 (12:51 -0700)]
pkg/utils/hwaddr: migrate code from IPAM pkg
Stefan Junker [Tue, 21 Jun 2016 23:28:38 +0000 (16:28 -0700)]
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
Minhan Xia [Tue, 3 May 2016 22:47:28 +0000 (15:47 -0700)]
add tests for generateHardwardAddr
Minhan Xia [Tue, 3 May 2016 19:03:05 +0000 (12:03 -0700)]
configure mac address based on assigned ip
Gabe Rosenhouse [Fri, 22 Jul 2016 20:36:20 +0000 (13:36 -0700)]
Merge pull request #270 from rosenhouse/integration-tests
Add integration tests of libcni
Gabe Rosenhouse [Fri, 22 Jul 2016 20:30:55 +0000 (13:30 -0700)]
plugins: cleanup tests of no-op plugin
Gabe Rosenhouse [Fri, 22 Jul 2016 20:14:00 +0000 (13:14 -0700)]
README: distinguish between runtimes and plugins
Adds a link to the 3rd party SR-IOV plugin.
Gabe Rosenhouse [Thu, 21 Jul 2016 20:03:58 +0000 (13:03 -0700)]
docs: fix tuning doc, correct the result json
it does not report the version, it never did
Gabe Rosenhouse [Thu, 21 Jul 2016 19:59:08 +0000 (12:59 -0700)]
spec: add version command and increment version to 0.2.0
Gabe Rosenhouse [Wed, 20 Jul 2016 20:39:51 +0000 (13:39 -0700)]
spec: remove CNI_VERSION env var, was never been implemented
No one uses this, and it is causing confusion (see #150)
Gabe Rosenhouse [Fri, 15 Jul 2016 00:33:16 +0000 (17:33 -0700)]
libcni: add integration test coverage
Gabe Rosenhouse [Thu, 14 Jul 2016 20:59:10 +0000 (13:59 -0700)]
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.
Gabe Rosenhouse [Fri, 15 Jul 2016 19:45:18 +0000 (12:45 -0700)]
Merge pull request #269 from rosenhouse/skel-dependency-injection
Refactor skel with dependency injection
Gabe Rosenhouse [Thu, 14 Jul 2016 23:09:27 +0000 (16:09 -0700)]
misc: fix up copyright dates
Tom Denham [Thu, 14 Jul 2016 20:32:05 +0000 (14:32 -0600)]
Merge pull request #263 from feiskyer/ptp-test
plugins/main/ptp: add functional tests
Gabe Rosenhouse [Thu, 14 Jul 2016 03:50:54 +0000 (23:50 -0400)]
pkg/skel: plugins now respond to VERSION command
To support CNI spec versioning, plugins must be able to report version
information to container runtimes.
Gabe Rosenhouse [Thu, 14 Jul 2016 02:54:22 +0000 (22:54 -0400)]
pkg/skel: improve error message for missing CNI_COMMAND env var
This makes the error message for missing CNI_COMMAND consistent with
that of other required environment variables.
Gabe Rosenhouse [Thu, 14 Jul 2016 02:24:34 +0000 (22:24 -0400)]
pkg/skel: missing env var log lines appear in stderr
Previously, the log lines appeared in stdout before the JSON encoding of
the error message. That would break JSON parsing of stdout. Instead, we use
stderr for these unstructured logs, consistent with the CNI spec.
Gabe Rosenhouse [Thu, 14 Jul 2016 02:12:06 +0000 (22:12 -0400)]
pkg/skel: refactor to use dependency injection
Extract dependencies on os to enable more complete unit test coverage
Pengfei Ni [Wed, 6 Jul 2016 02:24:16 +0000 (10:24 +0800)]
plugins/main/ptp: add functional tests
Gabe Rosenhouse [Wed, 6 Jul 2016 18:33:32 +0000 (11:33 -0700)]
Merge pull request #264 from rosenhouse/test-with-vagrant
Add Vagrantfile, document how to run test suite in a vagrant VM
Gabe Rosenhouse [Wed, 6 Jul 2016 06:07:55 +0000 (23:07 -0700)]
Add Vagrantfile, document how to run test suite in a vagrant VM
Tom Denham [Tue, 14 Jun 2016 22:31:23 +0000 (15:31 -0700)]
Merge pull request #247 from tomdee/spec-args-field
SPEC: introduce "args" field and new error code
Tom Denham [Mon, 13 Jun 2016 20:50:33 +0000 (13:50 -0700)]
SPEC: introduce "args" field and new error code
Based on previous discussions on the CNI maintainers calls, the spec is
unclear on 1) when CNI_ARGS should be used and 2) the fact the dynamic
config can be passed in through the network JSON.
This PR makes it clear that per-container config can be passed in
through the network JSON, adding a top level `args` field into
which orchestrators can add additional metadata without worrying that
plugins might reject the additional data. It also allows for plugins to
reject unknown fields passed in at the top level.
Using JSON is preferable to CNI_ARGS since it allows namespaced and
structured data. CNI_ARGS is a flat list of KV pairs which has reserved
characters with no escaping rules defined.
CNI_ARGS may still be used by orchestrators that want the simplicity of
passing the network config JSON as specified by the user, unchanged
through to the CNI plugin. But for any kind of structured data, it's
recommended that the `args` field in the JSON is used instead.
Lee Calcote [Tue, 14 Jun 2016 16:54:15 +0000 (11:54 -0500)]
README: grammatical corrections
Pengfei Ni [Tue, 14 Jun 2016 16:52:58 +0000 (00:52 +0800)]
pkg/ns: fix misspelling in comment
Stefan Junker [Tue, 14 Jun 2016 01:30:24 +0000 (18:30 -0700)]
Merge pull request #240 from steveeJ/unmarshall-string
pkg/types: unmarshal string tests
Stefan Junker [Mon, 6 Jun 2016 17:50:42 +0000 (19:50 +0200)]
pkg/types: cover string for unmarshal tests
Stefan Junker [Tue, 14 Jun 2016 01:17:48 +0000 (18:17 -0700)]
Merge pull request #238 from tomdee/string-unmarshaller
pkg/types: Add UnmarshallableString type
Stefan Junker [Thu, 9 Jun 2016 23:41:42 +0000 (01:41 +0200)]
Merge pull request #243 from containernetworking/maintainers-update-email
MAINTAINERS: Update @tomdee email address
Tom Denham [Thu, 9 Jun 2016 23:32:26 +0000 (16:32 -0700)]
MAINTAINERS: Update @tomdee email address
Tom Denham [Wed, 1 Jun 2016 00:12:40 +0000 (17:12 -0700)]
pkg/types: Add UnmarshallableString type
Allow strings to be unmarshalled for CNI_ARGS
CNI_ARGS uses types.LoadArgs to populate a struct.
The fields in the struct must meet the TextUnmarshaler interface.
This code adds a UnmarshallableString type to assist with this.
Stefan Junker [Thu, 2 Jun 2016 18:43:11 +0000 (20:43 +0200)]
Merge pull request #229 from steveeJ/cleanup-travis
travis: cleanup and bump go versions
Minhan Xia [Thu, 2 Jun 2016 18:37:05 +0000 (11:37 -0700)]
plugins/ipam: round robin ip allocation for host-local ipam
This changes the ip allocation logic to round robin. Before this, host-local IPAM searched for available IPs from start of subnet. Hence it tends to allocate IPs that had been used recently. This is not ideal since it may cause collisions.
Tom Denham [Thu, 2 Jun 2016 16:00:07 +0000 (09:00 -0700)]
Merge pull request #239 from steveeJ/master
MAINTAINERS: remove @zachgersh, add @dcbw
Michael Bridgen [Thu, 2 Jun 2016 15:51:57 +0000 (16:51 +0100)]
Merge pull request #218 from steveeJ/roadmap
Add ROADMAP document
Stefan Junker [Fri, 20 May 2016 11:07:35 +0000 (13:07 +0200)]
ROADMAP: initial version
Stefan Junker [Wed, 1 Jun 2016 23:15:24 +0000 (01:15 +0200)]
MAINTAINERS: remove @zachgersh, add @dcbw
Thank you Zach for all the great work done on CNI, farewell!
At the same time we are happy to welcome Dan amongst us who has already
contributed lots of valuable work!
Stefan Junker [Wed, 1 Jun 2016 14:03:17 +0000 (16:03 +0200)]
Merge pull request #219 from squaremo/more-contrib
docs: details on PR acceptance policy
Michael Bridgen [Fri, 20 May 2016 15:51:04 +0000 (16:51 +0100)]
docs: details on PR acceptance policy
Michael Bridgen [Mon, 30 May 2016 10:13:34 +0000 (11:13 +0100)]
Merge pull request #228 from jieyu/add_mesos
Added Mesos to CNI users.
Stefan Junker [Fri, 27 May 2016 13:57:40 +0000 (15:57 +0200)]
Merge pull request #231 from steveeJ/ns-verifiy-errors
pkg/ns: introduce error types to indicate NS verification
Stefan Junker [Fri, 27 May 2016 09:52:44 +0000 (11:52 +0200)]
pkg/ns: introduce error types indicate NS verification
Stefan Junker [Fri, 27 May 2016 11:49:05 +0000 (13:49 +0200)]
Merge pull request #230 from steveeJ/netns-optional-on-del
plugins: don't require CNI_NETNS for DEL command
Stefan Junker [Fri, 27 May 2016 10:26:42 +0000 (12:26 +0200)]
skel/test: add case for empty NETNS
Stefan Junker [Fri, 27 May 2016 08:57:39 +0000 (10:57 +0200)]
plugins: don't require CNI_NETNS for DEL command
This will allow to free up the IPAM allocations when the caller doesn't
have access to the network namespace anymore, e.g. due to a reboot.
Stefan Junker [Fri, 27 May 2016 08:56:24 +0000 (10:56 +0200)]
pkg/skel: allow arg requriements specified by CMD
Jie Yu [Wed, 25 May 2016 22:32:52 +0000 (15:32 -0700)]
README: add Mesos as CNI users
Stefan Junker [Thu, 26 May 2016 13:33:58 +0000 (15:33 +0200)]
travis: use go1.5.4
Stefan Junker [Thu, 26 May 2016 12:43:18 +0000 (14:43 +0200)]
travis: cleanup and bump go versions
* cleanup structure
* explicitly use go-{1.5.3,1.6.2}
Stefan Junker [Thu, 26 May 2016 11:22:29 +0000 (13:22 +0200)]
Merge pull request #227 from steveeJ/ns-verify
pkg/ns: consider PROCFS during NS verification
Stefan Junker [Wed, 25 May 2016 21:49:25 +0000 (23:49 +0200)]
pkg/ns: consider PROCFS during NS verification
This is an attempt to bring compatibility with Kernel <3.19, where NSFS
where PROCFS was used for network namespaces.
Stefan Junker [Wed, 25 May 2016 06:54:10 +0000 (08:54 +0200)]
Merge pull request #222 from steveeJ/ns-check-path
pkg/ns: verify netns when initialized with GetNS
Stefan Junker [Tue, 24 May 2016 20:30:01 +0000 (22:30 +0200)]
pkg/ns: test IsNSFS()
Stefan Junker [Tue, 24 May 2016 20:21:57 +0000 (22:21 +0200)]
pkg/ns: test case for rejecting a non-ns nspath
Stefan Junker [Tue, 24 May 2016 16:16:34 +0000 (18:16 +0200)]
pkg/ns: verify netns when initialized with GetNS
Stefan Junker [Tue, 24 May 2016 20:16:09 +0000 (22:16 +0200)]
Merge pull request #223 from steveeJ/ns-respect-close
pkg/ns: don't allow operations after Close()
Stefan Junker [Tue, 24 May 2016 18:48:12 +0000 (20:48 +0200)]
pkg/ns: add tests cases for Close()'d NS
Stefan Junker [Tue, 24 May 2016 18:27:18 +0000 (20:27 +0200)]
pkg/ns: don't allow operations after Close()
Stefan Junker [Fri, 20 May 2016 23:55:57 +0000 (01:55 +0200)]
Merge pull request #217 from steveeJ/fix-go-tip
build: don't be verbose / test: fix bash variable escaping in sudo command
Stefan Junker [Fri, 20 May 2016 10:38:19 +0000 (12:38 +0200)]
build: remove -x bash flag
Stefan Junker [Fri, 20 May 2016 09:33:23 +0000 (11:33 +0200)]
test: fix bash variable escaping in sudo command
Stefan Junker [Fri, 20 May 2016 23:34:21 +0000 (01:34 +0200)]
Merge pull request #50 from steveeJ/gwfix
bridge: add isDefaultGateway field