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
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
Solomon Hykes
b63b98ee27
engine.Sender and engine.Receiver support stdin
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-25 17:23:47 -07:00
Solomon Hykes
3c1d5ca33e
Remote communication between engines using beam
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-25 17:23:47 -07:00
Solomon Hykes
68d3e75750
engine: allow registering a "catchall" handler which receives all commands
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-25 17:23:16 -07:00
Solomon Hykes
9422451ac3
engine.Installer: a standard interface for "installable" services
...
Installer is a standard interface for objects which can "install"
themselves an engine by registering handlers.
This can be used as an entrypoint for external plugins etc.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-25 17:23:16 -07:00
Solomon Hykes
0fe48b0e59
Merge pull request #5345 from shykes/engine-installer
...
engine.Installer: a standard interface for "installable" services
2014-04-23 16:16:55 -07:00
Michael Crosby
f90029611f
Add exported status code from a job
...
This allows the job's status code to be consumed externally so that we
can use it as an exit code or saving to a state file.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-23 13:47:56 -07:00
Michael Crosby
7100ace42b
Remove error from engine.New()
...
Without creating a root there is no way for the engine to return an
error from the new function.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-23 11:54:35 -07:00
Michael Crosby
672edfe807
Remove the concept of a root dir out of engine
...
This makes the engine more general purpose so that we can
use it and the job routing functionality for reexec'ing our binary
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Conflicts:
integration/runtime_test.go
2014-04-22 19:04:03 -07:00
Solomon Hykes
4353f25e10
engine.Installer: a standard interface for "installable" services
...
Installer is a standard interface for objects which can "install"
themselves an engine by registering handlers.
This can be used as an entrypoint for external plugins etc.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 16:51:06 -07:00
Solomon Hykes
19e6614eeb
Clean up MAINTAINERS files
...
* Remove out of date "vacation mode"
* Fix my email address
* Remove infrastructure maintainers to reflect reality (core maintainers
are currently maintaining their own infrastructure).
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-21 18:17:13 -07:00
Jack Danger Canty
611a1d711b
typo fix: 'methid' -> 'method'
2014-04-19 23:25:48 -07:00
Solomon Hykes
ea2fba5ce0
Engine: optional Logging field to disable custom logging in engine.
...
* The default behavior is preserved
* This disables the use of the `TEST` environment variable in engine.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-07 21:41:25 +00:00
Michael Crosby
95e6fd819b
Revert "engine: fix engine.Env.Encode() to stop auto-guessing types."
...
This reverts commit 76057addb2
.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-04 11:29:56 -07:00
Solomon Hykes
76057addb2
engine: fix engine.Env.Encode() to stop auto-guessing types.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-03 23:53:42 +00:00
unclejack
611acf7a7c
handle symlinks for Docker's root dir & TMPDIR
...
This removes the incomplete symlink handling from engine.go and it adds
it one place in docker.go.
It also enables handling symlinks for TMPDIR.
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-03-03 23:00:53 +02:00
Solomon Hykes
56584a92f4
Merge pull request #4314 from shykes/engine-commands
...
Engine: builtin command 'commands' returns a list of registered commands
2014-02-25 09:59:26 -08:00
Victor Vieux
ad88d0be83
Merge pull request #4315 from shykes/engine-parsejob-test
...
Engine: add tests for ParseJob()
2014-02-24 14:27:19 -08:00
Victor Vieux
4a4915c8ee
Merge pull request #4312 from shykes/engine-error-reporting
...
Engine: clearer job error reporting
2014-02-24 13:58:12 -08:00
Solomon Hykes
0469e7d062
Engine: tiny cosmetic fix
...
To make @creack happy :)
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 12:31:39 -08:00
Solomon Hykes
d985fd4984
Engine: add tests for ParseJob()
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 12:31:39 -08:00
Solomon Hykes
cd846ecb60
Engine: builtin command 'commands' returns a list of registered commands
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 12:29:49 -08:00
Solomon Hykes
62b21daded
Engine: cleanup side effects between tests
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 12:29:39 -08:00
Solomon Hykes
8a1778301b
Engine: clearer job error reporting
...
* Job.Error and Job.Errorf always print a newline.
* Avoid redundant prefixing of error messages.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 11:53:56 -08:00
Solomon Hykes
2019a73f03
Engine.ParseJob: create a new job from a shell-like text command.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 11:38:13 -08:00
Solomon Hykes
353cc8c2a5
Fix engine tests on systems where temp directories are symlinked.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-15 14:39:51 -08:00
Victor Vieux
8fbdb7b59e
add setSubEnv and getSubEnv
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 04:01:46 +00:00
Victor Vieux
24086fa75d
job.error\* now return engine.StatusErr
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 04:01:46 +00:00
Victor Vieux
1498cd4e05
use exists
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 02:21:59 +00:00
Victor Vieux
28b5ae8cc4
changed default value of getenvint to 0. fix tests
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 02:06:08 +00:00
Victor Vieux
187646127f
fix convertion issues
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-30 00:56:42 +00:00
Victor Vieux
5ea2986ce5
Move containers to a job
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-24 16:07:42 -08:00
Victor Vieux
f41e0cf048
fix error handling
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-24 14:59:46 -08:00