Граф коммитов

115 Коммитов

Автор SHA1 Сообщение Дата
Solomon Hykes 3527291b47 Merge remote-tracking branch 'origin/ghost_handling-fix' 2013-04-12 10:33:36 -07:00
Guillaume J. Charmes bb22cd492e Add unit test for hanging kill + fix other tests behaviour 2013-04-11 16:21:19 -07:00
Guillaume J. Charmes 313d13ea01 Detect and mark ghost container. 2013-04-11 09:26:17 -07:00
Guillaume J. Charmes e68c04b722 force kill now use lxc-kill. Fixes #383 2013-04-11 09:04:04 -07:00
Solomon Hykes 1b7115a337 Merge remote-tracking branch 'origin/disable_signals-create_escape_sequence' 2013-04-09 12:56:32 -07:00
Guillaume J. Charmes faa8843650 Look for the escape sequence only in tty mode 2013-04-09 12:55:17 -07:00
Guillaume J. Charmes 0d9e54367f Fix deadlock on stop failure 2013-04-09 12:06:01 -07:00
Guillaume J. Charmes 1f70b1e15d Implement an escape sequence in order to be able to detach from a container 2013-04-09 11:06:17 -07:00
Solomon Hykes 1716fccbcc Merge remote-tracking branch 'origin/change_run_detach_behavious_tty_mode' 2013-04-09 10:39:13 -07:00
Guillaume J. Charmes 7c2b085d1a Add inconditionnal lock in Start/Stop/Kill to avoid races 2013-04-09 09:09:54 -07:00
Guillaume J. Charmes 64c1b6d9cd Change the behaviour of CmdRun in tty mode: dont kill the process uppon detach 2013-04-09 08:18:16 -07:00
Guillaume J. Charmes 329f4449dc Remove the mutexes and use chan instead in order to handle the wait lock 2013-04-09 07:57:59 -07:00
Guillaume J. Charmes 99b5bec069 Fix run disconnect behavious in tty mode + add unit test to enforce it 2013-04-05 19:02:35 -07:00
Guillaume J. Charmes 7d8895545e Cleanup pty variable names 2013-04-05 17:40:55 -07:00
Guillaume J. Charmes 33a5fe3bd4 Make sure the process start in his own session and grabs the terminal 2013-04-05 17:40:55 -07:00
Guillaume J. Charmes 847a8f45a4 Merge the 3 ptys in 1 2013-04-05 17:40:55 -07:00
Solomon Hykes 793c1ad990 Merge remote-tracking branch 'origin/219-default-bridge-2' 2013-04-05 14:02:16 -07:00
Solomon Hykes 2aad4a3478 Choose which TCP frontend port to allocate with '-p :PORT' 2013-04-04 22:58:01 -07:00
Solomon Hykes 3de51b7bfe Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-04-04 17:00:59 -07:00
Solomon Hykes a58cd8c616 Merge pull request #322 from sa2ajj/port-map-nitpick
change option description to reflect the semantics
2013-04-04 16:39:54 -07:00
Solomon Hykes 586a79cca0 Merge remote-tracking branch 'dominikh/minor-code-touchups' 2013-04-04 16:20:37 -07:00
Solomon Hykes 26088a72b3 Merge remote-tracking branch 'dominikh/improve-attachopts' 2013-04-04 15:18:41 -07:00
Guillaume J. Charmes d9a9bfc9c7 Make LXC aware of custom bridge 2013-04-03 16:15:44 -07:00
Dominik Honnef 4f36039e7b clean up AttachOpts type
Primarily, there is no reason to have a pointer to a map. Furthermore,
make() can be used on AttachOpts directly.
2013-04-03 16:06:35 +02:00
Mikhail Sobolev b74d1c9247 change option description to reflect the semantics
At least, for me, 'map' means that there are two values and one is "mapped" to
another.

In this case, just one value is provided (container's port), the other value is
automatically obtained (host's port) and the actual mapping can be seen using
``docker port`` command.
2013-04-03 16:37:56 +03:00
Dominik Honnef 22f1cc955d 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.
2013-04-03 11:18:23 +02:00
Solomon Hykes 15c3096e89 Merged attachStdin 2013-04-02 20:46:32 -07:00
Solomon Hykes 22d1622926 Merge remote-tracking branch 'robryk/writebroadcaster-stuff' 2013-04-02 20:35:13 -07:00
Solomon Hykes c04af2a330 docker run [-a [stdin|stdout|stderr] [...]]: choose which streams to attach to when running a command. Fixes #234. 2013-04-02 18:07:16 -07:00
Guillaume J. Charmes ad2bbe23be Close the broadcaster once they are not needed anymore 2013-04-02 12:19:01 -07:00
Guillaume J. Charmes 6882c78ce4 Add a stdincloser to container.Attach in order to close the client connection when needed 2013-04-02 12:18:20 -07:00
Solomon Hykes aea2675f7b Activate Config.StdinOnce at argument parsing 2013-04-02 11:02:19 -07:00
Robert Obryk a83d87abd4 Renamed writeBroadcaster.Close() to CloseWriters(). 2013-04-02 10:45:17 +02:00
Solomon Hykes c808940c04 Refactored CmdRun and CmdAttach to use Container.Attach 2013-04-01 23:52:20 -07:00
Mikhail Sobolev f65fc1e766 add host name parameter to "run" command
fixes #243
2013-04-02 01:26:17 +03:00
Mikhail Sobolev dcc9dfb27d make complex options to stand out 2013-04-02 01:26:17 +03:00
Caleb Spare c298a91f95 Use a *println or *print function instead of *printf where appropriate. 2013-04-01 12:17:00 -07:00
Solomon Hykes 1632566ecb Show shorthand image IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup images 2013-03-31 22:11:55 -07:00
Solomon Hykes a52a28b609 Temporarily disable a broken test (waiting for @creack to fix it), and silence a warning which pollutes unit tests but is complicated to fix 2013-03-31 22:05:14 -07:00
Solomon Hykes 54443c092c gofmt 2013-03-31 22:04:59 -07:00
Dominik Honnef 6f9a67a7c7 Make IP allocator lazy
Instead of allocating all possible IPs in advance, generate them as
needed.

A loop will cycle through all possible IPs in sequential order,
allocating them as needed and marking them as in use. Once the loop
exhausts all IPs, it will wrap back to the beginning. IPs that are
already in use will be skipped. When an IP is released, it will be
cleared and be available for allocation again.

Two decisions went into this design:

1) Minimize memory footprint by only allocating IPs that are actually
in use

2) Minimize reuse of released IP addresses to avoid sending traffic to
the wrong containers

As a side effect, the functions for IP/Mask<->int conversion have been
rewritten to never be able to fail in order to reduce the amount of
error returns.

Fixes gh-231
2013-04-01 06:02:44 +02:00
Guillaume J. Charmes d949e2804a Add a check to avoid double start (resulting in dockerd to panic) and unit test for it 2013-03-31 14:15:10 -07:00
Solomon Hykes 0b9a3c86a2 Show shorthand container IDs for convenience. Shorthand IDs (or any non-conflicting prefix) can be used to lookup containers 2013-03-31 02:02:01 -07:00
Guillaume J. Charmes 4760749402 Close the containers stdin when the process dies 2013-03-30 09:08:53 -07:00
Guillaume J. Charmes 7efde5eb83 Fix a scope issue preventing the close of slave stdin pty (#228) 2013-03-30 09:07:54 -07:00
Guillaume J. Charmes 5252ab697c Store the master ptys in order to close them when the process dies (#228) 2013-03-30 09:05:53 -07:00
Solomon Hykes d0d5d5ff09 Merge pull request #265 from dotcloud/formating_debug_harmonize
Formating debug harmonize
2013-03-29 21:30:43 -07:00
Guillaume J. Charmes 0f7a4534c1 Do not log non-running containers 2013-03-29 08:46:06 -07:00
Guillaume J. Charmes 7a565a0479 Remove unused variable from container struct 2013-03-29 08:41:48 -07:00
Guillaume J. Charmes 69c2250ec2 Add some error checking in container monitor 2013-03-29 08:29:59 -07:00