Commit Graph

31 Commits

Author SHA1 Message Date
cc0e75c911 remove addString and replace Tail
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: e304e3a6624e740159e99e83d6d13f0a3cdfeb49
Component: engine
2014-05-09 18:09:59 +00:00
e8fbf35f7c Engine: empty job names are illegal, catchall or not
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 3b73c26194836c1e2b737146a5b0c840226c65d2
Component: engine
2014-05-02 15:25:33 -07:00
8727b434c7 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)
Upstream-commit: de75af9fe2d91df7297e498d320b496addfb52f4
Component: engine
2014-05-02 15:25:32 -07:00
35fee9d895 engine: allow registering a "catchall" handler which receives all commands
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 68d3e757503fab422fc96a00d511336a3fdfd619
Component: engine
2014-04-25 17:23:16 -07:00
8fdb34e01b 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)
Upstream-commit: 9422451ac3f541a17daba0d5f6dc8b40a6edc9e9
Component: engine
2014-04-25 17:23:16 -07:00
d8eb119f29 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)
Upstream-commit: 7100ace42bda2660d1eaecb2ec096ba6753688ea
Component: engine
2014-04-23 11:54:35 -07:00
5c5b3c1ca6 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
Upstream-commit: 672edfe807c597a1c245bce996a150dfdf273a3c
Component: engine
2014-04-22 19:04:03 -07:00
e5168686ec 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)
Upstream-commit: ea2fba5ce04d3eb2a8959b8f5116604faae1e88a
Component: engine
2014-04-07 21:41:25 +00:00
04d68b69ad 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)
Upstream-commit: 611acf7a7c1c3a6796e862fb94143890a9aa4573
Component: engine
2014-03-03 23:00:53 +02:00
171ee11139 Engine: builtin command 'commands' returns a list of registered commands
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: cd846ecb60ad936d58d70762ed91cffa906cef93
Component: engine
2014-02-24 12:29:49 -08:00
32c3efbd4e Engine: cleanup side effects between tests
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 62b21daded2ea9b703a6e5fa0479e007016b1edb
Component: engine
2014-02-24 12:29:39 -08:00
f14c0fd180 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)
Upstream-commit: 2019a73f0387af273be3b6e085fdae0e5a67ba3b
Component: engine
2014-02-24 11:38:13 -08:00
10c689f549 move pull and import to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 9dcbdbc4b1addb67c0fdcadab1c8f98f30e58b4c
Component: engine
2014-01-24 14:46:31 -08:00
1de8e12295 clean up test log
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 8cbabf2c3e24b6fc0f676a8696133742622f7249
Component: engine
2014-01-16 16:07:42 -08:00
f633c6e7d1 Move root symlink check to engine.New
Since commit c91c365, when starting the docker daemon without an
existing /var/lib/docker directory, it fails with:

  2013/12/18 23:39:36 Unable to canonicalize root (%!s(*string=0xc210077c80)): lstat /var/lib/docker: no such file or directory

Move the symlink checking code to engine.New after the root dir has been
created.
Upstream-commit: 94821a33534a25fe906f3f66e1c06b1f2c877aac
Component: engine
2013-12-19 00:39:12 -06:00
f1ea4ce449 Merge pull request #3113 from shykes/engine-export
Move 'docker export' to the engine API
Upstream-commit: 0025e9bd719b1cd8314543019ed8e6f6bc5c57cd
Component: engine
2013-12-10 13:28:24 -08:00
bb99db485b Engine: break out Env utilities into their own type - Env
Upstream-commit: a80c059baeff0b7d563499e963059a183c7e1bd9
Component: engine
2013-12-08 06:06:05 +00:00
6e1bef0570 Engine: don't log job stdout to engine stdout (it might be non-text output, for example tar data for 'export'
Upstream-commit: 50f3a696bdfde5aed8f020fbac24af4c6c653ca9
Component: engine
2013-12-08 01:33:05 +00:00
8c54ea502c Enable engine to take Stderr and Stdout for mocking in tests
Upstream-commit: 25d3db048e761ee2c61a2cc8d58196786616988b
Component: engine
2013-12-06 01:18:18 -08:00
3236823285 add env variable to disable kernel version warning
Allow the user to set DOCKER_NOWARN_KERNEL_VERSION=1 to disable the
warning for RHEL 6.5 and other distributions that don't exhibit the
panics described in https://github.com/dotcloud/docker/issues/407.
Upstream-commit: e4aba11e80561d06e457453c58def970518b691c
Component: engine
2013-12-02 15:56:51 -06:00
b0f24a88da Engine: integer job status, improved stream API
* Jobs return an integer status instead of a string
* Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command"
* Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
Upstream-commit: a4f8a2494b0fb755db52c68cf61ddc8ff52d2965
Component: engine
2013-11-30 00:25:46 +00:00
cea9cd6554 gofmt
Upstream-commit: b00d5f018541bf141dc4732ad6d71d23b8c28b43
Component: engine
2013-11-13 19:25:55 +00:00
a48718c85a Merge branch 'job-create-start-clean' into engine-patch-2
Conflicts:
	engine/engine.go
	engine/job.go
	server.go
	utils_test.go
Upstream-commit: 6c4393ccbbec0fa66f9fc7e326b5a2809615c3a1
Component: engine
2013-11-13 00:36:20 +00:00
6d24142423 go fmt
Upstream-commit: 6998c3c387518ba8e06ceff00b10be583c95d6cd
Component: engine
2013-11-07 12:27:33 -08:00
e6df3df72c Engine: 'create' creates a container and prints its ID on stdout
Upstream-commit: e5f8ab6160401fb541121da5b5cbc3af4fce28b7
Component: engine
2013-11-05 23:00:20 +00:00
18c16d13e3 Engine: improved logging and identification of jobs
Upstream-commit: 4e7cb37dcc18975010df630d8c9580a3a65e0e69
Component: engine
2013-11-05 18:39:59 +00:00
02af0b7684 Engine: fix a bug which caused handlers to be shared between multiple engine instances
Upstream-commit: 847411a1ee6e5ee5d051fc4729425215dc0c8561
Component: engine
2013-11-05 18:39:59 +00:00
26507356b3 Engine: 'start' starts the specified container
Upstream-commit: 958b4a8757e83c3fada757b10dd1be4ab7bff5ee
Component: engine
2013-11-05 18:39:59 +00:00
1ae36ff617 Engine: Engine.Job() never fails, to mimic the os/exec API (and make usage less verbose)
Upstream-commit: a13241d370bb9862acdefbc7dbb1e338d9552eaa
Component: engine
2013-10-26 17:49:16 -07:00
ff1fcc1bf9 Engine: centralize checks for supported architectures and kernel versions
Upstream-commit: 1b8eef4efbdd308f0dff0ae063ea49c0f4142888
Component: engine
2013-10-26 14:21:04 -07:00
2bbe323db0 Minimal, unintrusive implementation of a cleaner Job API.
* Implement a new package: engine. It exposes a useful but minimalist job API.
* Refactor main() to instanciate an Engine instead of a Server directly.
* Refactor server.go to register an engine job.

This is the smallest possible refactor which can include the new Engine design
into master. More gradual refactoring will follow.
Upstream-commit: 0d1a825137448e2f41e5aaa5ecae8094c8ab6817
Component: engine
2013-10-26 14:18:13 -07:00