Alexander Morozov
6d65fa1faa
Merge pull request #10208 from mota/fix-env-writerto
...
Fix env.WriteTo count return
2015-02-06 14:14:16 -08:00
Josh Hawn
e662775ffb
Fix premature close of build output on pull
...
The build job will sometimes trigger a pull job when the base image
does not exist. Now that engine jobs properly close their output by default
the pull job would also close the build job's stdout in a cascading close
upon completion of the pull.
This patch corrects this by wrapping the `pull` job's stdout with a
nopCloseWriter which will not close the stdout of the `build` job.
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-01-27 10:07:01 -08:00
Derek McGowan
12d83e727d
Fix write after close on http response
...
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-21 15:14:01 -08:00
Pierre Wacrenier
0cd30cf399
Fix env.WriteTo count return
...
Some calls like json.Encoder.Encode mask the number of bytes written to
an io.Writer. The solution provides a wrapper io.Writer around the
actual io.Writer that allows multiple calls to Write to be considered as
one and allow access to this count.
Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
2015-01-21 01:14:23 +01:00
Arnaud Porterie
59da197de8
Remove unused Engine.Logf
...
The `Engine.Logf` method was unused and confusing.
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2014-12-02 10:47:57 -08:00
Jessica Frazelle
e171eda998
fix for iptables cleanup 8307
...
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-29 10:59:20 -07:00
Alexandr Morozov
b3b4043345
Use common logging in engine
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:24 -07:00
Alexandr Morozov
cb106e74a1
Merge pull request #8238 from vbatts/vbatts-daemon_timestamps
...
daemon logging: unifying output and timestamps
2014-10-16 15:55:49 -07:00
Doug Davis
a7cd25b8b6
Fix error paring null JSON - Issue7941
...
Closes #7941
Treat a null in JSON, when reading the config of a container, as if the
property was never included. W/o this fix the null would be saved in the
property as a string with a value of "null".
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-09-28 19:51:00 -07:00
Vincent Batts
92df943fbf
daemon logging: unifying output and timestamps
...
A little refactor of the ./pkg/log so engine can have a logger instance
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-26 14:44:46 -04:00
Vishnu Kannan
c786a8ee5e
Adding docker exec support in CLI.
...
Fixed a bug in daemon that resulted in accessing of a closed pipe.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-09-16 19:24:25 +00:00
Vincent Batts
6e0bc06018
engine.Env: comments and tests for Get()
...
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-10 22:20:49 -04:00
unclejack
76212635b5
move some io related utils to pkg/ioutils
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
Tibor Vass
426fbee810
Merge pull request #7800 from djbk/master
...
Cleanup: Typo in job.go
2014-09-02 17:47:18 -07:00
Byung Kang
cc84ec3f61
Cleanup: Typo in job.go
...
Signed-off-by: Byung Kang <byungk91@gmail.com>
2014-09-02 19:37:14 -05:00
Alexandr Morozov
114838cbda
Some more style fixes
...
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-29 15:21:28 +04:00
Rajdeep Dua
0800f8cc19
Added Test case for Engine shutdown
...
Docker-DCO-1.1-Signed-off-by: Rajdeep Dua <dua_rajdeep@yahoo.com> (github: rajdeepd)
2014-08-19 04:59:13 -07:00
Solomon Hykes
6aecdb4f8e
Workaround to avoid 5 second delay on graceful daemon restart
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 21:40:25 +00:00
Solomon Hykes
eb79dc14fe
Engine.Shutdown only waits 5 seconds for active jobs to complete
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:12 +00:00
Solomon Hykes
92105ea0fa
Remove unused field from engine.Job
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:12 +00:00
Solomon Hykes
61eab75939
Extra testing for engine.Shutdown
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:12 +00:00
Solomon Hykes
d745067487
Subsystems can register cleanup handlers with Engine.OnShutdown
...
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:11 +00:00
Victor Vieux
b3ee9ac74e
update go import path and libcontainer
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
LK4D4
1d3d1c5d2b
Change floats to ints recursively on env encoding
...
Fixes #6246
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-24 23:39:26 +00:00
LK4D4
01b424028e
Benchmarks for engine/env
...
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-24 21:48:16 +04:00
LK4D4
f08cd445b0
Fix go vet errors
...
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-06-18 17:39:57 +00:00
Victor Vieux
384b60b940
remove unused beam, will be back later as libchan
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-06-11 19:09:55 +00:00
Solomon Hykes
ca231b3de5
pkg/testutils: utility functions to facilitate writing Go tests
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-06-01 23:23:31 +00:00
Solomon Hykes
8d213e91b3
Merge pull request #5706 from vieux/remove_add_string
2014-05-14 17:31:52 -07:00
Solomon Hykes
a1754c7e46
Engine: Receiver and Sender preserve Job.Env
...
When sending a new job to a `engine.Sender`, the corresponding
`engine.Receiver` will receive that job with its environment preserved.
Previously the job name, arguments and streams were preserved but the
env was lost.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-09 17:10:33 -07:00
Solomon Hykes
c7978c9809
Engine: Env.MultiMap, Env.InitMultiMap: import/export to other formats
...
* `Env.MultiMap` returns the contents of an Env as `map[string][]string`
* `Env.InitMultiMap` initializes the contents of an Env from a `map[string][]string`
This makes it easier to import and export an Env to other formats
(specifically `beam/data` messages)
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-09 17:06:32 -07:00
Solomon Hykes
d61190169d
Engine: ensure all pipes are properly closed by Receiver and Sender
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
[michael@docker.com: fix stdin closing in engine.Job.Run]
[michael@docker.com: fix fd leak in engine.Receiver.Run]
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
Docker-Tested-By: Solomon Hykes <solomon@docker.com>
Docker-Tested-by: Michael Crosby <michael@docker.com>
2014-05-09 16:12:21 -07:00
Solomon Hykes
bf25951837
Engine: slightly more stress-testing of Receiver/Sender to reproduce the hang problem
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-09 15:49:44 -07:00
Solomon Hykes
dfdc03b061
Engine: fix a timeout bug in Sender/Receiver
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-09 15:49:44 -07:00
Solomon Hykes
0aeff69e59
Fix stdin handling in engine.Sender and engine.Receiver
...
This introduces a superficial change to the Beam API:
* `beam.SendPipe` is renamed to the more accurate `beam.SendRPipe`
* `beam.SendWPipe` is introduced as a mirror to `SendRPipe`
There is no other change in the beam API.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-09 15:39:55 -07:00
Victor Vieux
0f6fe22833
Merge pull request #5686 from crosbymichael/cast-to-closer
...
Cast Input and Output to io.Closer
2014-05-09 11:17:53 -07:00
Victor Vieux
e304e3a662
remove addString and replace Tail
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-09 18:09:59 +00:00
Michael Crosby
170e4d2e19
Cast Input and Output to closer
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-05-08 12:57:19 -07:00
Bryan Murphy
fdccfaf72a
move Table to a separate file and add additional unit tests
...
Docker-DCO-1.1-Signed-off-by: Bryan Murphy <bmurphy1976@gmail.com> (github: bmurphy1976)
2014-05-08 02:31:23 +00:00
Solomon Hykes
3b73c26194
Engine: empty job names are illegal, catchall or not
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-02 15:25:33 -07:00
Solomon Hykes
de75af9fe2
engine: catchall handler is shadowed by specific handlers
...
This allows using `Engine.Register` and `Engine.RegisterCatchall` on the
same engine without the catchall hiding all other handlers.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-02 15:25:32 -07:00
Tianon Gravi
defecac279
Fix various MAINTAINERS format inconsistencies
...
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-04-30 11:22:11 -06:00
Solomon Hykes
20e9f61971
Merge pull request #5320 from JackDanger/jackdanger/typo-doc-fix
2014-04-29 17:41:16 -07:00
Solomon Hykes
d8332f433f
Merge pull request #5422 from shykes/engine-spawn
...
engine/spawn: run an engine in a subprocess, remote-controlled by Beam
2014-04-28 12:56:02 -07:00
Solomon Hykes
9b23178f58
engine.Len returns the number of keys in an env
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-28 00:37:42 -07:00
Solomon Hykes
b4b83ef8ae
engine/spawn: run an engine in a subprocess, remote-controlled by Beam
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-27 14:11:46 -07:00
Solomon Hykes
9236e088eb
Fix bug in engine.Sender
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-27 14:11:45 -07:00
Solomon Hykes
62f4c88443
Merge pull request #5374 from shykes/beam-engine
...
Remote communication between engines using beam
2014-04-27 14:10:59 -07:00
Solomon Hykes
4701f8ee60
Merge pull request #5365 from crosbymichael/job-status
...
Add exported status code from a job
2014-04-25 17:27:07 -07:00
Solomon Hykes
7e3624a498
engine: 'rengine' is a small command-line utility to debug remote engine
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-25 17:23:47 -07:00