1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00
Commit Graph

324 Commits

Author SHA1 Message Date
Solomon Hykes
97dc795a22 Beam: Send: pass the underlying error unchanged to allow io.EOF detection
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: f94a18677a8c832d386ea96714c7e58874bb31f9
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
b63ccc059a 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)
Upstream-commit: 11f2531da631f25437216a051be7699ff2d4663a
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
6186d9389e beam/examples/beamsh: correctly parse nested commands
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 7f00a3b6652c9601986e9b7020ceb78cfd3f7740
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
d22e5562e8 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)
Upstream-commit: fd890136a9fc5770b0e2acf5fbb966bbb377a1f3
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
27b0b6b2ee 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)
Upstream-commit: cd8ddacdc7ced235dafda9b8ff0177cf2c5827f3
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
9f2ceac9b4 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)
Upstream-commit: be470f2497eb478b81e46134e5ce13fb41c4ec1c
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
8c46cf1cfd Beam: basic test harness for the unix socket implementation.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 0e42c7d889232ea90192ec368637c3f05c6347c8
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
887592a8d7 Beam: USocketPair returns a *net.UnixConn socket pair for convenience.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 59853c188d6f7a3b1d73af7451d2b92d9d37ab21
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
b6a1a1be31 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)
Upstream-commit: c401c43cae4d646a2a7f87850518a1d6ca6ada57
Component: engine
2014-04-22 15:50:15 -07:00
Solomon Hykes
f4f2d42aa7 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)
Upstream-commit: b637e5f04af010bd1fc6bef93b8512d587d90c46
Component: engine
2014-04-22 15:50:14 -07:00
Solomon Hykes
3a8ae6b55f Beam: allow sending messages without attachments.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 188c2ef806f50312139484c7d34bd9a3e42773ec
Component: engine
2014-04-22 15:50:14 -07:00
Solomon Hykes
f1a1563d00 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)
Upstream-commit: 3960da04c87e8830378699c5b2b47a50944359b6
Component: engine
2014-04-22 15:50:14 -07:00
Solomon Hykes
780c1843ce 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)
Upstream-commit: 5957e6b385065cfa7e1ada851b1811a0900ef836
Component: engine
2014-04-22 15:50:14 -07:00
Guillaume J. Charmes
e178abd17a Merge pull request #5328 from crosbymichael/refactor-cgroups
Refactor cgroups into subsystems and support metrics
Upstream-commit: 781671245778c8cfdde1892204bb10899020b0d8
Component: engine
2014-04-21 14:06:17 -07:00
unclejack
9f1c340e38 Merge pull request #5223 from crosbymichael/load-profile
Use apparmor parser directly 
Upstream-commit: c0d5eac120913ac1c52f2abf41c454bbf0242263
Component: engine
2014-04-21 21:50:59 +03:00
Guillaume J. Charmes
1ea14534fa 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)
Upstream-commit: 813cebc64fb4b628e2938405d86144060c330eb9
Component: engine
2014-04-21 10:32:13 -07:00
Guillaume J. Charmes
eec18ea747 Make sure @proc is defined
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: ac814ee3c76a3851d361e8dddfed7ac93ddf10e2
Component: engine
2014-04-21 10:28:04 -07:00
Michael Crosby
7aff9b75c9 Use cgo to get systems clock ticks for metrics
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 004cf556e86a03d8961416b3e8a0a476a424b10f
Component: engine
2014-04-21 10:26:22 -07:00
Michael Crosby
f2dbe8f1d1 Refactor stat parsing to use only 8 fields
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f59be989dc92503f29aa94ebf9ea4097ec28b8c9
Component: engine
2014-04-20 20:45:08 -07:00
Evan Hazlett
3973334e17 work on cpu stats
Docker-DCO-1.1-Signed-off-by: Evan Hazlett <ejhazlett@gmail.com> (github: ehazlett)
Upstream-commit: 2f24b5a9dcc9ca5da07563fb0dd381e49ed844cc
Component: engine
2014-04-21 00:07:05 -04:00
Michael Crosby
d5fdf0aaaa 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)
Upstream-commit: bce49dff0d46dec620e755ed859efa791054a843
Component: engine
2014-04-20 18:35:33 -07:00
Michael Crosby
a0be7fcb46 Reuse cpuacct stats for cpu subsystem
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 3bfe13de2c38fda5b57e2499f474da701495c5ba
Component: engine
2014-04-20 18:20:44 -07:00
Michael Crosby
2f3e3558eb Fix parsing of blkio files
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 37248039e186f57768bb5c4fad23b1bca65448f7
Component: engine
2014-04-20 18:18:17 -07:00
Michael Crosby
030a007d36 Add external function to get cgroup stats
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 7f12260fd13329f3bafe4b42ad4193ff963bb1e2
Component: engine
2014-04-20 17:36:20 -07:00
Michael Crosby
af2fbf289d Refactor stats and add them to all subsystems
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 9b65f1635515fa35ed38f8a76b6d8f73ab3a1d02
Component: engine
2014-04-20 12:02:39 -07:00
Michael Crosby
1b76554adc 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)
Upstream-commit: 86e34ce59fb7f6e6e284a33f2538bafdc9114c89
Component: engine
2014-04-20 11:34:28 -07:00
Michael Crosby
112b738831 Add remove method to subsystems
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 7fdeda87173ee6722ef1cbe7b21a13ac8b173365
Component: engine
2014-04-18 22:17:31 -07:00
Michael Crosby
39b03cf53c Break down groups into subsystems
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: e92f2fd3950644a6e5eb38259cee9036648090cb
Component: engine
2014-04-18 22:10:30 -07:00
Michael Crosby
fec63c3950 Move raw cgroups into fs package (filesystem)
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 06db0604e5e5438dc14e13a069ebddcab7bb4bc6
Component: engine
2014-04-18 21:34:26 -07:00
Michael Crosby
91235494a6 Move systemd code into pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: ec43ec50b44cff3f043c78cad97466c68e2ba8cd
Component: engine
2014-04-18 21:30:08 -07:00
Michael Crosby
0b62a2c5be Refactor cgroups file locations
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 42fb2973c690fe4e4f65da235ce4dfa4c388e8a3
Component: engine
2014-04-18 21:14:58 -07:00
Kato Kazuyoshi
da097b4451 SQLite is also available in FreeBSD
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
Upstream-commit: 92ea101bc4a498e952ede00bff53d0123f22f41c
Component: engine
2014-04-17 07:19:30 +09:00
Michael Crosby
d953b1e434 Generate imports based on what is avaliable
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 3061a6a2ab0395c626f9acaa2e5d9c17152b0475
Component: engine
2014-04-14 05:22:45 +00:00
Michael Crosby
fbaa43b382 Ignore not exist errors for joining default subsystems
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 184728e7bcf9af3224f53e8d5d38d44b08de24ec
Component: engine
2014-04-14 00:07:48 +00:00
Victor Vieux
0ac428f052 Merge pull request #5132 from crosbymichael/fix-cgroup-hiar
Setup cgroups for supported subsystems
Upstream-commit: 5fc1b4d2cd76cb0d04f66c85424d54408e70037f
Component: engine
2014-04-14 10:56:15 -07:00
Guillaume J. Charmes
156fab79f3 Merge pull request #4878 from kzys/freebsd-utimes
Support FreeBSD on pkg/system/utimes_*.go
Upstream-commit: f98ed28c1dd5766cb8c80f32418f13878df29e6c
Component: engine
2014-04-14 10:39:25 -07:00
Michael Crosby
4b3fd1c81f Ignore is not exist error
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 6c26a87901d12188dfd9986d9211f6077a286f9d
Component: engine
2014-04-14 00:03:35 +00:00
Michael Crosby
ebb2ad0565 Move apparmor to top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 052cc5a6378ee4bbe1ef79e5632e2439d68ddbde
Component: engine
2014-04-13 23:33:25 +00:00
Michael Crosby
b85f5791ad 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)
Upstream-commit: 5f4bc4f916f433a4ba258980a6c2fbdbd76d64f3
Component: engine
2014-04-13 23:31:10 +00:00
Alexander Larsson
5b7c5b263f 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)
Upstream-commit: 4ddfffcab3edf3d05ee8319e87410fe747979a04
Component: engine
2014-04-11 17:29:40 +00:00
Michael Crosby
9ba641b0ce Join cpuacct, freezer, perf_event, and blkio groups
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 505184d2dcb5d21834bcb2b108564fbdab733953
Component: engine
2014-04-11 17:28:27 +00:00
Michael Crosby
b455526c28 Setup cgroups for all subsystems
Fixes #5117
Fixes #5118
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 031fcb31d3a81fbd5c5ab8d898d53fbd486413e6
Component: engine
2014-04-11 17:28:27 +00:00
Victor Vieux
4ea377c1c7 Merge pull request #5143 from kzys/ns-nil
Avoid "invalid memory address or nil pointer dereference" panic
Upstream-commit: b8c10d8af254a6200de642e246b5a0d9de0dfca8
Component: engine
2014-04-10 11:07:35 -07:00
Guillaume J. Charmes
39bbc0e47b Merge pull request #5131 from crosbymichael/shm-mode
Change shm mode to 1777
Upstream-commit: 042a50a8fe1e54ce602d1c517091381c209eabf3
Component: engine
2014-04-10 07:50:32 -07:00
Guillaume J. Charmes
b4f2aeb444 Merge pull request #5115 from alexlarsson/fix-libcontainer-network-rhel6
Fix libcontainer network support on rhel6
Upstream-commit: 5b242c95da303ee26d3119678340050670fed45a
Component: engine
2014-04-10 07:45:12 -07:00
Kato Kazuyoshi
9a57be369c 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)
Upstream-commit: c5226d94fab4e261fe2407262d9b5177326d4062
Component: engine
2014-04-10 22:07:29 +09:00
Kato Kazuyoshi
5b3ff631ca 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)
Upstream-commit: 1c90a4dd9a83526ca3837ab9231ff6a9af07e072
Component: engine
2014-04-10 07:34:37 +09:00
Alexander Larsson
7b99942ebd 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)
Upstream-commit: 59c1b2880be8fb9d9a632fa42a10097c1580591a
Component: engine
2014-04-09 15:44:18 +02:00
Michael Crosby
6caf919b33 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)
Upstream-commit: 63c303eecdbaf4dc7967fd51b82cd447c778cecc
Component: engine
2014-04-09 11:55:08 +00:00
Michael Crosby
855754fa1c Change shm mode to 1777
Fixes #5126
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 986cf931c38b8cdc51da44af0313502ca1156cfc
Component: engine
2014-04-09 10:53:32 +00:00