Solomon Hykes
f4c6f14d0a
pkg/dockerscript: expose a simple, clean API with a single Parse method
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
d1f2f389ff
beam/examples/beamsh: correctly parse nested commands
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
c757cfdcb1
dockerscript: patch text/scanner to use a shell-like syntax instead of the default go-like syntax
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
d188c734e9
pkg/dockerscript: a simple shell-like syntax to express docker operations
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
358c2f3ca4
Beam: beamsh is a mini-shell which runs processes and communicates with them over beam
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
f3671ea62d
Beam: basic test harness for the unix socket implementation.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
968d5bb08f
Beam: USocketPair returns a *net.UnixConn socket pair for convenience.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
be03962d64
Beam: fix file descriptor leaks
...
* Close all file descriptors successfully sent as attachment
* Close duplicate file descriptors created by net.FileCon and net.UnixConn.File
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
95b759ad16
Beam: change the prototype of SendPipe() to return a *net.UnixSocket
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00
Solomon Hykes
0a187f629a
Beam: allow sending messages without attachments.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00
Solomon Hykes
c008283f8d
Beam: convenience functions Listen and Connect
...
These convenience functions expose a familiar face to the unknown and bizarre world of beam networking.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00
Solomon Hykes
932149b2a7
Beam: a simple stream-oriented communication protocol for distributed systems.
...
This patch includes a stripped down implementation with a bare minimum
unix socket transport. It relies on fd passing for stream multiplexing.
The purpose of this first patch is to allow implementation of dynamic
linking, which will allow advanced service discovery.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00
Guillaume J. Charmes
3ee90e1348
Merge pull request #5328 from crosbymichael/refactor-cgroups
...
Refactor cgroups into subsystems and support metrics
2014-04-21 14:06:17 -07:00
unclejack
e353fa62bb
Merge pull request #5223 from crosbymichael/load-profile
...
Use apparmor parser directly
2014-04-21 21:50:59 +03:00
Guillaume J. Charmes
296ec56759
Merge branch 'master' into load-profile
...
Conflicts:
daemon/execdriver/native/create.go
daemon/execdriver/native/driver.go
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-04-21 10:32:13 -07:00
Guillaume J. Charmes
29c10b7427
Make sure @proc is defined
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-04-21 10:28:04 -07:00
Michael Crosby
ded58db1eb
Use cgo to get systems clock ticks for metrics
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-21 10:26:22 -07:00
Michael Crosby
26bd4906d6
Refactor stat parsing to use only 8 fields
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-20 20:45:08 -07:00
Evan Hazlett
ef26b1c65e
work on cpu stats
...
Docker-DCO-1.1-Signed-off-by: Evan Hazlett <ejhazlett@gmail.com> (github: ehazlett)
2014-04-21 00:07:05 -04:00
Michael Crosby
21e6eeffb9
Add freezer stats
...
This one is a problem because the most useful stat is a string and not a
float like verything else. We may have to change the return type
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-20 18:35:33 -07:00
Michael Crosby
e09e819712
Reuse cpuacct stats for cpu subsystem
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-20 18:20:44 -07:00
Michael Crosby
3bd149f766
Fix parsing of blkio files
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-20 18:18:17 -07:00
Michael Crosby
dcbca94904
Add external function to get cgroup stats
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-20 17:36:20 -07:00
Michael Crosby
ab15aa234c
Refactor stats and add them to all subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-20 12:02:39 -07:00
Michael Crosby
b5b44ad439
Squashed commit of the following:
...
commit 75af1649b063abbc5d662fd2f8bc4ff62c927687
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 01:32:42 2014 -0400
more refactor
commit 43b36d0f15d634497127bcb17dacaa70ae92e903
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 01:11:49 2014 -0400
refactored cgroup param parsing to util func
commit e3738b0168a075bd92ec828879b0e46bdbbe3845
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 00:57:19 2014 -0400
dat error checking
commit 57872bcc59403ecd308cfe97c78f73d6ca58d165
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 00:43:25 2014 -0400
proper use of fmt.Errorf
commit 43dad6acc0cb21aac2b04ce074699879898ee820
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 00:36:45 2014 -0400
proper placement of defer
commit b7f20b934b2bc92cd39397dbc608b77bff28493c
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 00:34:39 2014 -0400
defers, error checking, panic avoidance
commit 7a9a6ff267f8806dfe6676486f73fe89b72968fb
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 00:22:00 2014 -0400
data param to use container info instead of host
commit 0e0cf7309be1644687160d6519db792b23cd26e9
Author: Evan Hazlett <ejhazlett@gmail.com>
Date: Sun Apr 20 00:11:29 2014 -0400
added stats for cpuacct, memory, and blkio
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-20 11:34:28 -07:00
Michael Crosby
810cf722cc
Add remove method to subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-18 22:17:31 -07:00
Michael Crosby
bb89b83c68
Break down groups into subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-18 22:10:30 -07:00
Michael Crosby
8cc8aca9cc
Move raw cgroups into fs package (filesystem)
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-18 21:34:26 -07:00
Michael Crosby
9f508e4b3e
Move systemd code into pkg
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-18 21:30:08 -07:00
Michael Crosby
a183681b1d
Refactor cgroups file locations
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-18 21:14:58 -07:00
Kato Kazuyoshi
d79271c0b2
SQLite is also available in FreeBSD
...
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-04-17 07:19:30 +09:00
Michael Crosby
7612df5c8a
Generate imports based on what is avaliable
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-14 05:22:45 +00:00
Michael Crosby
f95367f57f
Ignore not exist errors for joining default subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-14 00:07:48 +00:00
Victor Vieux
b0481297a1
Merge pull request #5132 from crosbymichael/fix-cgroup-hiar
...
Setup cgroups for supported subsystems
2014-04-14 10:56:15 -07:00
Guillaume J. Charmes
2fb2497321
Merge pull request #4878 from kzys/freebsd-utimes
...
Support FreeBSD on pkg/system/utimes_*.go
2014-04-14 10:39:25 -07:00
Michael Crosby
a8c9c4bf97
Ignore is not exist error
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-14 00:03:35 +00:00
Michael Crosby
ca3224687b
Move apparmor to top level pkg
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-13 23:33:25 +00:00
Michael Crosby
b0dfd5c5d9
Use apparmor_parser directly
...
The current load script does alot of things. If it does not find the
parser loaded on the system it will just exit 0 and not load the
profile. We think it should fail loudly if it cannot load the profile
and apparmor is enabled on the system.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-13 23:31:10 +00:00
Alexander Larsson
e5ba166e75
Join memory and cpu cgroup in systemd too
...
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: crosbymichael)
2014-04-11 17:29:40 +00:00
Michael Crosby
1dd3c38cb5
Join cpuacct, freezer, perf_event, and blkio groups
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-11 17:28:27 +00:00
Michael Crosby
27ceac34af
Setup cgroups for all subsystems
...
Fixes #5117
Fixes #5118
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-11 17:28:27 +00:00
Victor Vieux
0fe679322b
Merge pull request #5143 from kzys/ns-nil
...
Avoid "invalid memory address or nil pointer dereference" panic
2014-04-10 11:07:35 -07:00
Guillaume J. Charmes
eb0ec63b59
Merge pull request #5131 from crosbymichael/shm-mode
...
Change shm mode to 1777
2014-04-10 07:50:32 -07:00
Guillaume J. Charmes
8a64aa8f4b
Merge pull request #5115 from alexlarsson/fix-libcontainer-network-rhel6
...
Fix libcontainer network support on rhel6
2014-04-10 07:45:12 -07:00
Kato Kazuyoshi
8dc1d8b6c0
Avoid "invalid memory address or nil pointer dereference" panic
...
libcontainer.GetNamespace returns nil on FreeBSD because
libcontainer.namespaceList is empty. In this case, Namespaces#Get should
return nil instead of being panic.
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-04-10 22:07:29 +09:00
Kato Kazuyoshi
6b292bf034
Support FreeBSD on pkg/system/utimes_*.go
...
Implement system.LUtimesNano and system.UtimesNano. The latter might be
removed in future because it's basically same as os.Chtimes. That's why
the test is mainly focusing LUtimesNano.
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-04-10 07:34:37 +09:00
Alexander Larsson
db1a117450
Fix libcontainer network support on rhel6
...
It seems that netlink in older kernels, including RHEL6, does not
support RTM_SETLINK with IFLA_MASTER. It just silently ignores it, reporting
no error, causing netlink.NetworkSetMaster() to not do anything yet
return no error.
We fix this by introducing and using AddToBridge() in a very similar manner
to CreateBridge(), which use the old ioctls directly.
This fixes https://github.com/dotcloud/docker/issues/4668
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-09 15:44:18 +02:00
Michael Crosby
1df38475cd
Revert "Support hairpin NAT without going through docker server"
...
This reverts commit b39d02b611f1cc0af283f417b73bf0d36f26277a.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-09 11:55:08 +00:00
Michael Crosby
6b4ca764f0
Change shm mode to 1777
...
Fixes #5126
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-09 10:53:32 +00:00
Michael Crosby
4b3bfc742b
Check for apparmor enabled on host to populate profile
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-09 10:22:17 +00:00