29 Commits
Author SHA1 Message Date
Eugene Yakubovich 2440b4a54d Merge pull request #960 from steveeJ/private-net-selection2
networking: allow network selection with private-net (2nd impl.)
2015-05-29 17:42:47 -07:00
Stefan Junker c65f7aa31f networking: allow network selection with private-net
This commit adds the possiblity of passing a comma separated list of network
names to the '-private-net' argument. Only networks with their names specified
are loaded in the pods network stack.

The network documentation has been updated accordingly.
2015-05-29 17:21:53 -07:00
Eugene Yakubovich 6c3f1e34c2 Merge pull request #963 from steveeJ/acmetadataurl-env
networking: populate AC_METADATA_URL correctly
2015-05-29 13:41:18 -07:00
Stefan Junker 299a0ee6ad networking: populate AC_METADATA_URL correctly
This commit allows the mentioned environment var to be populated correctly.
On the way some error handling for involved code was added.
2015-05-29 11:35:09 -07:00
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
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 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
Eugene Yakubovich dbc1f0f238 net: add option to expose ports on hosts
Ports that were defined in app manifest can be
exposed via --port=name:host-port option on cmd line.
For example, given app manifest with ports entry:
{
    "name": "http",
    "port": 80,
    "protocol": "tcp"
}

rkt run --private-net --port=http:8888 myapp.aci
will forward traffic from host's tcp port 8888 to
container's port 80.

Fixes #624
2015-04-03 17:24:02 -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 83cc67037e net: rkt list supports displaying container's IP addrs
Fixes #593
2015-03-18 14:06:04 -07:00
Eugene Yakubovich b82c4dc4d3 net: bug fix: don't use hard coded path to container dir
Containers not migrate thru state directories so hard
coded path was broken
2015-03-12 17:38:13 -07:00
Eugene Yakubovich 2e09dc9ce4 Merge pull request #525 from endocode/alban/withNetNS
net: withNetNS: attempt to revert net ns in case of error
2015-03-05 17:32:22 -08:00
Jonathan Boulle 17a3e8e8a7 Merge pull request #524 from endocode/alban/netns-error
net: fix error management
2015-02-13 09:15:32 -08:00
Alban Crequy ba154ffbe7 net: withNetNS: attempt to revert net ns in case of error
Before this patch, when withNetNS() returns with an error, the current
net namespace is undefined. In order to make the API more readable,
withNetNS() should always at least attempt to return in a defined
namespace used before being called, even in case of errors.

In practice, the only caller of withNetNS will handle the error case
correctly by calling Teardown() so there should be no functional changes
with this patch.
2015-02-13 16:54:16 +01:00
Alban Crequy b843ce369b net: fix error management 2015-02-13 16:10:13 +01:00
Eugene Yakubovich facff5ed44 net: copy netconf files into container dir
The user might modify or delete the net config
files while the container is running. This will
mess up the plugins on the teardown path. Copying
them into a the container directory and using them
from there should guard against that. It also lays
the foundation for GC to process unremoved files.
2015-02-12 17:34:48 -08:00
Jonathan Boulle 72395d1ffa *: vendor appc spec
Take two at getting the spec vendored into Rocket with Godep.
Since actool is used during the construction of the stage1.aci, it
really needs to be vendored too to prevent any unexpected divergence
between whatever version the user happens to have in their PATH. Thus,
we introduce a silly dummy package (stage1/dummy.go) to coerce Godep
into vendoring actool. This also requires a slight rearrangement of the
appc repo, moving some functionality from actool itself into the aci
package.
2015-02-05 14:36:40 +01:00
Eugene Yakubovich a9c8cf4b45 net: call ipam plugin on container shutdown
- Fixes bugs in ipam/static release path
- veth and bridge plugins invoke ipam plugin during DEL cmd
2015-02-04 14:04:35 -08:00
Eugene Yakubovich 630beda3ae net: cnvt ipmanager to ipam plugin; make use of ipam plugins
- Convert ipamanager into IPAM plugin (static) that uses env
variables instead of cmd line args
- Make bridge and veth plugins call out to IPAM plugin
- Refacor code around the new IPAM plugins
2015-02-02 18:15:51 -08:00
Eugene Yakubovich 25ecad8162 Integrate metadata service
- Move metadatasvc into rkt as a subcommand
- Add option to spawn metadatasvc from rkt run
- Register container with metadatasvc
- Removes anti-spoofing logic -- this belongs in the network plugin

Fixes #33
2015-01-23 13:25:46 -08:00
Eugene Yakubovich ba9b6bc82a net: use env vars for plugin params; use stage1 rootfs for builtins
Simplifying the plugin interface. No more HTTP interface and plugin
configs. Plugin type maps to executable name in stage1 rootfs or
on host in a well known dir. Env vars are used for parameter passing
to the plugin. Also, default net conf is kept in stage1 rootfs to make
private networking work "out of the box".
2015-01-22 15:17:51 -08:00
Peter Bourgon c4183a7af5 networking: go vet and golint fixes
- Fix several Printf argument errors
- Fix exported symbols without comments
- Fix existing comments to abide proper style
- Fix struct declarations that use unkeyed fields
2015-01-22 17:19:01 +01:00
Eugene Yakubovich 696faf67b1 net: Give the host end of veth an IP
The scheme of having a host veth not have an IP
and not be plugged into bridge does not work in
practice. This creates a true point-to-point link
between the container and the host.
2015-01-21 12:58:02 -08:00
Eugene Yakubovich a4dec0aded add copyright notice and rename module 2015-01-12 16:58:03 -08:00
Eugene Yakubovich cda3e42555 incorporating code review feedback 2015-01-12 16:58:03 -08:00