12 Commits

Author SHA1 Message Date
Eugene Yakubovich fd91916f2f networking: fix gc cleaning up networks
This also undoes the temporary work around
of using absolute paths for pod directories.

Fixes #953
2015-05-29 10:06:51 -07:00
Eugene Yakubovich 03a907b587 networking: hanlde error json from plugin
When plugins exit with non-zero code, they now
print a JSON with the error info to stdout. This
will parse this output and report that error.

Partly fixes #953
2015-05-28 16:48:26 -07:00
Jonathan Boulle 9685f37575 *: adjust copyright header
Inspired by a similar change in the Kubernetes project [1], this changes
the copyright header to the more generic "The rkt Authors" rather than
"CoreOS, Inc.", which is only sometimes correct.

https://github.com/GoogleCloudPlatform/kubernetes/commit/6b3a6e6b983f967c88d14d26542ec6e30c49ebd3
2015-05-03 14:29:15 -07:00
Jonathan Boulle e1e407f836 networking: make netns path absolute for CNI plugins
As discovered in #851 - some of the CNI plugins (for example, veth)
relies on the supplied `CNI_NETNS` as a source of uniqueness for things
like entropy. In theory this is reasonable because network namespace
paths should be unique per-pod. However, in rkt, the stage1 init (which
executes the plugins) was passing a relative path from its cwd, rather
than an absolute path - for example, "netns" rather than
"/var/lib/rkt/pods/<uuid>/netns".

As a consequence of this, every network plugin was executed with the
same value for `CNI_NETNS`. This results in conflicts when e.g. every
veth plugin attempts to create an interface by the same name, since they
do a straightforward hash of `CNI_NETNS` to generate interface names.

This should be considered an interim solution until this is definitively
answered in the upstream CNI specification.

https://github.com/appc/cni/issues/5
2015-05-01 18:53:33 -07:00
Jonathan Boulle ce47f2db66 networking: podRoot -> rktRoot
rktRoot is misleading as the directory is really the root of a specific
pod. Also add a TODO note that this is currently only ever set to cwd
(i.e. "."), and hence necessitates relative paths.
2015-05-01 16:29:01 -07:00
Eugene Yakubovich 7abd8f3b84 net: switch to using CNI plugins 2015-04-27 14:43:25 -07:00
Eugene Yakubovich bf33546a2d net: stage1 gc will clean up networking 2015-04-14 17:03:03 -07:00
Jonathan Boulle 79753c9b19 *: rocket -> rkt 2015-03-31 16:31:21 -07:00
Jonathan Boulle 3fd0303076 *: global containers -> pods rename 2015-03-31 15:55:06 -07:00
Eugene Yakubovich ebdc1503df mdsvc: no more 169.254.196.255 address
Since the spec requires AC_METADATA_URL env var,
well known IP is no longer needed. This removes
the iptables manipulation. Instead the IP address of the
host is passed in the AC_METADATA_URL. This host IP
is the address of the host end of the default veth.
2015-03-30 16:04:56 -07:00
Eugene Yakubovich 0b935f467f net: set FD_CLOEXEC on RktLock prior to fork/exec
When launching metadata service and net plugins,
set the close-on-exec flag so the child processes
don't end up holding the lock.
2015-03-19 17:14:31 -07:00
Jonathan Boulle 90a6410b4f *: s/-/_/ in go filenames 2015-03-11 13:09:37 -07:00