Commit Graph

39 Commits

Author SHA1 Message Date
8f0ba8b1bd Check that the line is valid with 6 parts after split
Upstream-commit: 589d7c68dbfe0cf4a84b96b799871bfbff4a5970
Component: engine
2013-05-03 13:49:10 -05:00
9af19a7a8b strings.Split may return an empty string on no match
* This fixes an index out of range crash if cgroup memory is not
  enabled.
Upstream-commit: 4bc8ef42d4f294bf6fec6d728ef27abbb638b98d
Component: engine
2013-05-02 14:44:41 -05:00
500a2c5aa9 Use /proc/mounts instead of mount(8)
Specifically, Ubuntu Precise's cgroup-lite script uses mount -n
to mount the cgroup filesystems so they don't appear in mtab, so
detection always fails unless the admin updates mtab with /proc/mounts.

/proc/mounts is valid on just about every Linux machine in existence and
as a bonus is much easier to parse.

I also removed the regex in favor of a more accurate parser that should
also support monolitic cgroup mounts (e.g. mount -t cgroup none /cgroup).
Upstream-commit: c6119da33925fccf6af3f232f7aa7c75de41493b
Component: engine
2013-04-30 17:37:43 +00:00
f318096044 Update FindCgroupMountpoint to be more forgiving
On Gentoo, the memory cgroup is mounted at /sys/fs/cgroup/memory, but the mount line looks like the following:
memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)

(note that the first word on the line is "memory", not "cgroup", but the other essentials are there, namely the type of cgroup and the memory mount option)
Upstream-commit: e413340723871ad2d7a03822ca06993ee3c0a4bc
Component: engine
2013-04-23 01:09:29 -06:00
6b46021e64 Move the kernel detection to arch specific files
Upstream-commit: 16aeb77d5155cf33d1637073b9ca56728d472b49
Component: engine
2013-04-22 12:08:59 -07:00
59824ca670 Make the kernel version detection more generic
Upstream-commit: 4ac3b803b9b7d0db1840a12f3332034938eb9550
Component: engine
2013-04-22 11:39:56 -07:00
7f4ff6f610 Merge pull request #454 from tianon/master
Update utils.go to not enforce extra constraints on the kernel "flavor" (such as being integral or even comparable one to another)
Upstream-commit: 2ced94b41461a399bc848006901af5ab15d665c3
Component: engine
2013-04-22 08:02:42 -07:00
1e9641c3d7 Do not stop execution if cgroup mountpoint is not found
Upstream-commit: 71b580661451c35f01ee3824506f572c52d86ac8
Component: engine
2013-04-22 00:44:57 -04:00
547af82c3d Update utils.go to not enforce extra constraints on the kernel "flavor" (such as being integral or even comparable one to another)
This is especially to fix the current docker on kernels such as gentoo-sources, where the "flavor" is the string "gentoo", and that obviously fails to be converted to an integer.
Upstream-commit: 1f65c6bf4c9dcfc513eeb9da34a7cac60c6bc4ff
Component: engine
2013-04-21 19:19:38 -06:00
262fafb31f 'docker push' shows an additional progress bar while it buffers the archive to disk. Fixes #451.
Upstream-commit: 965e8a02d24a35aa7a7f64f2baf2b652a04f5983
Component: engine
2013-04-21 15:29:26 -07:00
b4f4a13791 Use mount to determine the cgroup mountpoint
Upstream-commit: f3e89fae287778cb8b7056e228170e0073c9a046
Component: engine
2013-04-18 21:57:58 -07:00
4408440fb3 Check kernel version and display warning if too low
Upstream-commit: 003622c8b6587814744a9903f3286dc1b07554c2
Component: engine
2013-04-18 20:47:24 -07:00
4a464fa427 Use integers instead of non-printable chars in the escape sequence detection
Upstream-commit: 626bfd87a7eadd64b16fb02d547f75d1a8f94aa7
Component: engine
2013-04-09 12:55:26 -07:00
086efb3f6d Remove unused optimization that could lead in loosing the escape sequence
Upstream-commit: 8f41f1fa60587d77ad3ce2109fc03180488f49cc
Component: engine
2013-04-09 12:55:26 -07:00
9ea0876e63 Implement an escape sequence in order to be able to detach from a container
Upstream-commit: 1f70b1e15d0dea5f36395d325cbac2892e4f2e8a
Component: engine
2013-04-09 11:06:17 -07:00
d6aac87dba replace unreachable returns with panics
Not only is this a more common idiom, it'll make finding bugs easier,
and it'll make porting to Go 1.1 easier.

Go 1.1 will not require the final return or panic because it has a
notion of terminating statements.
Upstream-commit: 22f1cc955dbf25132e69d126f8db0e5498bffbd2
Component: engine
2013-04-03 11:18:23 +02:00
23aad300e5 Merge remote-tracking branch 'robryk/writebroadcaster-stuff'
Upstream-commit: 22d16229264aeb176acc40db2158d9b944cb3ef1
Component: engine
2013-04-02 20:35:13 -07:00
96ec0e911c Use an environment variable to activate debug mode, instead of a package-specific flag
Upstream-commit: 76663079312bb501f545823d9650df9eeda2c882
Component: engine
2013-04-02 10:58:16 -07:00
450827385c Renamed writeBroadcaster.Close() to CloseWriters().
Upstream-commit: a83d87abd442dda5f2d67a2701aae9c7b891e68a
Component: engine
2013-04-02 10:45:17 +02:00
28343696b9 Show shorthand image IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup images
Upstream-commit: 1632566ecb133fb0853aec6715c5c06a4a9e41da
Component: engine
2013-03-31 22:11:55 -07:00
6d568468b4 Show shorthand container IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup containers
Upstream-commit: 0b9a3c86a26b4b7eb463a6c73cb030bc851fdd64
Component: engine
2013-03-31 02:02:01 -07:00
11d54ca9a7 Add debug infos in CmdInfo to know the amount of fds and goroutines in use
Upstream-commit: 99f9b697165f1f081499b45b7789508dcf0c2553
Component: engine
2013-03-30 10:33:10 -07:00
d2f9375ffc Swapped a map for a list in writeBroadcaster.
Upstream-commit: 75ba07cb3a7fcf5d6cc9f1120fd3468a9658be67
Component: engine
2013-03-30 16:04:19 +01:00
248356b56f Make writeBroadcaster safe for concurrent use.
Upstream-commit: 0bdfcfaa33b4945fdfd6ff9ea82bf3c5aa63848d
Component: engine
2013-03-30 16:02:22 +01:00
002d37a1c9 Fix #108, reattach now works properly
Upstream-commit: 0b2eee8b33448c27c4d2b29b995a56ce3a411963
Component: engine
2013-03-29 09:31:47 -07:00
2db6acd48b Fix a race condition in bufReader.
The race condition cen be detected by running existing bufReader tests
with Go's race detector.
Upstream-commit: d52451bcf887790df5a6a7cbbc7305747535eb11
Component: engine
2013-03-29 11:00:50 +01:00
3e91a54abc Camelize some snake_case variable names
Upstream-commit: a6da7f138c0b260d560c63e234c87db0f5c72bb1
Component: engine
2013-03-28 20:12:23 -04:00
1eacf7201c Improve the debug function
Upstream-commit: 6576b19a28a688f00dbe21318b4073826001cf3c
Component: engine
2013-03-25 01:29:01 -07:00
71cb06de21 Add a Debugf() helper and a -D (debug) flag to docker
Upstream-commit: 6e507b9460b81e830ef2f5d10035d08e3948fe4d
Component: engine
2013-03-22 11:44:12 -07:00
69e910efff Moved Go() to the main package... And got rid of the useless docker/future package
Upstream-commit: 623e91e2e3f3d0b408a43606df8d3c037a6b03be
Component: engine
2013-03-21 01:13:55 -07:00
b2da51604c Moved Download() and progressReader{} to the main package
Upstream-commit: d7c5d060c4b3c4a38a843e92f832bbf97483d16b
Component: engine
2013-03-21 00:54:54 -07:00
3350acc2a3 Moved HumanDuration() to the main package
Upstream-commit: 299d0b2720ad5efee89c11b47d6de51094714164
Component: engine
2013-03-21 00:52:43 -07:00
0b5203d2cd 'docker pull' and 'docker put' automatically detect tar compression (gzip, bzip2 or uncompressed). -j and -z flags are no longer required.
Upstream-commit: f437f5b8b4a706d56f9a7cfba1dbc6b21e9a33f3
Component: engine
2013-02-22 12:28:25 -08:00
6d5ac81c48 utils: Added SelfPath(), which figures out the current (absolute) path of the running binary
Upstream-commit: e6adfa2bc68db8f1f1ccd9facea6fa8f8bed4a33
Component: engine
2013-02-13 13:58:28 -08:00
747cbf0250 'docker ps' prints shorter lines
Upstream-commit: bcfe2aa2a7834eb49790f400192422350ba32cdb
Component: engine
2013-01-29 03:18:07 -08:00
a499fea2e5 go fmt
Upstream-commit: 333abbf85a8db9578e34c340032e32de3c8fefe8
Component: engine
2013-01-28 14:30:05 -08:00
e87565c8da docker tar: stream the contents of a container as a tar archive
Upstream-commit: 37035363031db161732b5757485bec37ef429fb2
Component: engine
2013-01-27 00:59:49 -08:00
12fbbf0518 Plugged 4 more commands into the real backend: 'diff', 'reset', 'run', 'stop'. 'run' actually runs the process, but doesn't capture outptu properly, and encounters mount issues
Upstream-commit: 5d6dd22fb2d689f98cadba6b7317658331307f3e
Component: engine
2013-01-26 15:56:42 -08:00
5c70746915 Initial commit
Upstream-commit: a27b4b8cb8e838d03a99b6d2b30f76bdaf2f9e5d
Component: engine
2013-01-18 16:13:39 -08:00