Commit graph

99 commits

Author SHA1 Message Date
Michael Crosby
c4769ec624 Change IP to address because it includes the subnet
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
1cecb00003 Refactory cgroups into general pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
b90aaf6828 Remove clone_vfork
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
848fd7638b Revert "WIP for setup kmsg"
This reverts commit 80db9a918337c4ae80ffa9a001da13bd24e848c8.

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Alexander Larsson
3de41b34a2 libcontainer: Initial version of cgroups support
This is a minimal version of raw cgroup support for libcontainer.
It has only enough for what docker needs, and it has no support
for systemd yet.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-21 14:56:16 -08:00
Michael Crosby
8590435fa0 WIP for setup kmsg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
d68ba7742f Remove privileged.json config
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
c20c1dfb04 Add comments to many functions
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
ca0e7f087c Add CAP_NET_ADMIN
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
3ded9b431a Update readme and add TODO
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
bb59129b2f Refactor to remove cmd from container
Pass the container's command via args
Remove execin function and just look for an
existing nspid file to join the namespace
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
663518ba66 Add execin function to running a process in a namespace
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
e3d5adc9e2 Refactor large funcs
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Guillaume J. Charmes
b48bc85967 OSX compilation
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@dotcloud.com> (github: creack)
2014-02-21 14:56:16 -08:00
Michael Crosby
84ba029e25 General cleanup of libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
ab6864d0c0 Add dynamic veth name
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:16 -08:00
Michael Crosby
8430fbf11e Implement init veth creation
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:15 -08:00
Michael Crosby
e25ebdd06c Simplify namespaces with only nsinit
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:15 -08:00
Michael Crosby
c1f8606d50 Use nsinit as app
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:15 -08:00
Guillaume J. Charmes
d62cc1cc66 Fix ptmx issue on libcontainer
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-21 14:56:15 -08:00
Guillaume J. Charmes
a304eab9d4 Improve general quality of libcontainer
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-21 14:56:15 -08:00
Michael Crosby
593219d191 Use nsinit for setting up namespace
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:15 -08:00
Michael Crosby
c2777d4611 WIP moving to nsini
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:15 -08:00
Michael Crosby
b0cdb601b9 Make separate nsinit pkg for a dockerinit like init
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:15 -08:00
Michael Crosby
81d2c67492 Initial commit of libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-21 14:56:15 -08:00
Michael Crosby
f8923d8060 Merge pull request #4011 from crosbymichael/add-netlink-functions
Add more netlink functions
2014-02-18 19:37:52 -05:00
Victor Vieux
beafc8047f Merge pull request #4168 from crosbymichael/add-listenbuffer
Hold connections until the daemon has fully loaded
2014-02-17 16:04:49 -08:00
Victor Vieux
9f2154da59 Merge pull request #4153 from crosbymichael/move-proxy
Move proxy into pkg
2014-02-17 14:51:16 -08:00
Michael Crosby
dbf686ccc3 Remove verbose logging for non errors
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-17 13:31:13 -08:00
Michael Crosby
0c6b7299a4 Make crosbymichael and creack netlink maintainers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-17 11:17:05 -08:00
Michael Crosby
16db4da051 Change name to listenbuffer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-15 21:10:37 -08:00
Michael Crosby
fb500991ec Add socket activation for go apps
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-15 20:18:47 -08:00
Michael Crosby
d3da259b24 Move proxy into pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-14 15:48:05 -08:00
Michael Crosby
3b7915ab05 Add new functions to unsupported file
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-14 12:12:35 -08:00
Guillaume J. Charmes
a890f18e9a Simplify code + Allow more generic attr children + remove prefix
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-12 09:29:06 -08:00
Guillaume J. Charmes
19445d3dfc Merge remote-tracking branch 'mike/add-netlink-functions' into implement_create_veth
Conflicts:
	pkg/netlink/netlink_linux.go

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-12 04:17:12 -08:00
Guillaume J. Charmes
000df04348 Implement create veth
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-12 04:09:56 -08:00
Solomon Hykes
cf90100c6c pkg/opts: a collection of custom value parsers implementing flag.Value
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 19:59:52 -08:00
Michael Crosby
43a219048a Merge branch 'add-netlink-functions' of github.com:crosbymichael/docker into add-netlink-functions
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-11 03:33:18 -08:00
Tianon Gravi
6675d69513 Add comment clarifying null termination
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-11 10:32:31 -07:00
Michael Crosby
f697f1d648 Exec out to ip right now for creating the veth pair
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-11 03:32:35 -08:00
Michael Crosby
1d3028efa3 Add more netlink functions for set ns by fd and bring iface down
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-10 22:32:07 -08:00
Michael Crosby
a37785b64f Allow add of empty name
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-10 16:41:16 -08:00
Victor Vieux
4ba6e44fe0 Merge pull request #3524 from tianon/supplementary-groups
Add supplementary groups lookup in sysinit
2014-02-10 14:42:14 -08:00
Michael Crosby
f62dcac1c5 Create veth pair via netlink
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-10 13:37:16 -08:00
Michael Crosby
4b4a12a4c3 Improve get if socket loop
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-10 11:36:23 -08:00
Tianon Gravi
e44920cbe6 Update NetworkChangeName to be more similar to my original (moving IFNAMSIZ constant outside the function like it should've been)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-09 18:14:17 -07:00
Michael Crosby
4f9817a3ca Replace my C code with tianons Go code
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-09 05:54:13 -08:00
Michael Crosby
971834148c Use c to change interface name
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-08 20:44:04 -08:00
Michael Crosby
708c7be9d2 Add network set interface in namespace by pid
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-08 10:03:16 -08:00