Commit Graph

156 Commits

Author SHA1 Message Date
0551904b7c Link to HTTPS URLs in engine comments
Updates most of the instances of HTTP urls in the engine's
comments. Does not account for any use in the code itself,
documentation, contrib, or project files.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: ca37301d54e1525d4522dea266180072d4fd892b
Component: engine
2015-04-11 13:31:34 -04:00
fd315b5f1a Unwanted declaration causing compilation issues with gccgo
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 73d08528ea9b043cbe941b1219b1c55625c636a8
Component: engine
2015-04-10 19:47:15 +00:00
8bd8b0185d Remove Job from docker images
Also removes engine.Table

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d045b9776b5dc16e12b3d7c7558a24cdc5d1aba7
Component: engine
2015-04-08 19:33:01 -07:00
10a440fbc6 Remove err field from Job struct, fixes #11804
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 60085e22ff9981bf26711295d12ea64ee29d85ea
Component: engine
2015-03-27 19:08:53 +01:00
1c9316a817 Merge pull request #11788 from reikani/pchoi
Changed snake case naming to camelCase.
Upstream-commit: da5c863d20df8c030b3ffc6c4e95f976ed162721
Component: engine
2015-03-26 23:55:50 -07:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
0913f2905d Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
Upstream-commit: ae907e7af16136225417242ef5d55d3f6062fb3b
Component: engine
2015-03-26 15:05:45 -06:00
b6ee273588 add back job.Errorf
c79b9bab54167 (Remove engine.Status and replace it with standard go error)
cause a regression that create container won't get any warnings, we still
need this to send useful informations to user.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 40ef253ef516a82d4a3d1cf23f7d3bee2a08bc4f
Component: engine
2015-03-26 13:12:36 +08:00
a16f3d6cb4 Remove engine.Status and replace it with standard go error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c79b9bab541673af121d829ebc3b29ff1b01efa2
Component: engine
2015-03-25 22:32:08 +01:00
217062d14b Merge pull request #11533 from hqhq/hq_fix_decode
fix decode data loss when using int64 in json
Upstream-commit: 639d60b5380157c05d72682812ba879d84f70c4e
Component: engine
2015-03-25 10:17:10 -06:00
1e47557825 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: b80fae735684406d848b16a0f148a746e17ed25f
Component: engine
2015-03-24 18:19:59 +01:00
4361d07cff Refactors pkg/testutils
Solves #11579.

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
Upstream-commit: 5de1e7bc3a823e1a4fa35ddf75401d233b3e4692
Component: engine
2015-03-22 22:31:46 -07:00
088f0e2cb3 Merge pull request #9774 from pwaller/cancellation
Add basic build cancellation
Upstream-commit: 45ee402a631a59e2a33df7b2f63a49f6f3f84f09
Component: engine
2015-03-22 19:16:23 -07:00
7c1bfa9093 Implement build cancellation
Add the capability to cancel the build by disconnecting the client.

This adds a `cancelled` channel which is used to signal that a build
should halt. The build is halted by sending a Kill signal and noticing
that the cancellation channel is closed.

This first pass implementation does not allow cancellation during a
pull, but that will come in a subsequent PR.

* Add documentation of cancellation to cli and API

* Protect job cancellation with sync.Once

* Add TestBuildCancelationKillsSleep

* Add test case for build cancellation of RUN statements.

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 671c12204cb469d868f646da1474d5bad6541770
Component: engine
2015-03-22 11:31:28 +00:00
381a991ca2 fix decode data loss when using int64 in json
The problem is when I create container though REST api, set memory limit
in hostConfig, the memory limit didn't work. Because when we DecodeEnv,
we got hostConfig part of Env like this:
{"Binds":["/:/tmp"],"CpuShares":512,"CpusetCpus":"0,1","Devices":[],"Memory":1.6777216e+07,"MemorySwap":0}

And we cannot unmarshal number 1.6777216e+07 into Go value of type int64,
so we got 0.

We can fix this by setting Decoder as UseNumber().

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 0aa250bd60e472dadfd8e9e1f90465e041b03983
Component: engine
2015-03-21 10:16:18 +08:00
449ca606a0 Add integration test for unix sock cleanup
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 16309bef6395a50ee2871780b81caed8bc6c498e
Component: engine
2015-03-20 12:34:35 -04:00
b3678f8418 Merge pull request #11076 from hqhq/hq_use_warning_in_sysinfo
use type WARN for warning
Upstream-commit: 82f390e139e611b97911c19dd1be2a98264cf4b9
Component: engine
2015-03-15 21:13:23 -07:00
b4071d7043 Merge pull request #10924 from tcnghia/master
engine.Tail() to ignore trailing whitespaces.
Upstream-commit: 227f60ce76a0b73ea0b6534cab34dd7ae777a6f6
Component: engine
2015-03-12 12:55:48 -07:00
ad6ee8ec46 fix warning messages
Use log.Warnf instead of log.Infof, and remove redundant `WARNING` prefix.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: bffe04b582d143f074297b260a359dfb54a7763b
Component: engine
2015-03-11 08:47:45 +08:00
f486128375 Add system time to /info
This change adds daemon's system time as RFC3339Nano to the `/info` endpoint
and shows in a more readable format (UnixDate) in `docker -D info` output.

I will be using this to fix the clock skew between the remote test host and
the CI machines running `docker events`-related tests as they're using `--since`
and `--until` and the timestamps are not matching when daemon is not on the
same machine.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 2977fd2b7aed42008ca2ad90dcd8fec5ead4e86b
Component: engine
2015-03-10 15:29:05 -07:00
5506a9a27c Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 89bdaa35e04b74b7c6528783e0f7b8154b2a3d31
Component: engine
2015-03-06 18:21:51 -08:00
e051d5c51d moving random.go from utils
Closes #10962
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 53ece336dcab8e778fc37afc7a264f7d168110ff
Component: engine
2015-02-26 18:31:18 +00:00
10a5bce5a0 engine.Tail() to ignore trailing whitespaces.
In its current form, if an error message has two trailing "\n" instead
of one, an empty line is resulted (see engine/job.go for an example of
such usages).

Skipping all trailing whitespaces will give a better error message.

Signed-off-by: Nghia Tran <nghia@google.com>
Upstream-commit: b422d8da8f1d1e51da6cfff4890e6a08252da7c5
Component: engine
2015-02-20 19:42:01 -08:00
a251ace79f Merge pull request #10208 from mota/fix-env-writerto
Fix env.WriteTo count return
Upstream-commit: 6d65fa1faa4770b5e7930da8f9e8bd82be539475
Component: engine
2015-02-06 14:14:16 -08:00
3c4927bcb2 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)
Upstream-commit: e662775ffb096fdb4a7f247bb25b8e3022006c1b
Component: engine
2015-01-27 10:07:01 -08:00
c43f530252 Fix write after close on http response
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 12d83e727dd3522006b53afbcfac3cdce178117a
Component: engine
2015-01-21 15:14:01 -08:00
a5f51dc24e 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>
Upstream-commit: 0cd30cf3991de1b491cac3c0cecdc976f0098f29
Component: engine
2015-01-21 01:14:23 +01:00
dabbee5901 Remove unused Engine.Logf
The `Engine.Logf` method was unused and confusing.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 59da197de8f040eed7560747476f97ce8afad293
Component: engine
2014-12-02 10:47:57 -08:00
c55ffb34ca fix for iptables cleanup 8307
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: e171eda9989cb5d10e7fe14b258f239edb124541
Component: engine
2014-10-29 10:59:20 -07:00
06bafa7589 Use common logging in engine
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: b3b40433451d8e76d02dc70d591027f680c9a3bf
Component: engine
2014-10-24 15:03:24 -07:00
a4666e24dd Merge pull request #8238 from vbatts/vbatts-daemon_timestamps
daemon logging: unifying output and timestamps
Upstream-commit: cb106e74a14a37157b09459965a69c944f9c19f0
Component: engine
2014-10-16 15:55:49 -07:00
56d2073a6d 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>
Upstream-commit: a7cd25b8b69fe23c6458f5242dcd9f9039c99f48
Component: engine
2014-09-28 19:51:00 -07:00
50457aefd5 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>
Upstream-commit: 92df943fbf225d78b160babb36e9c6fd38cdc0d0
Component: engine
2014-09-26 14:44:46 -04:00
8b57e6f159 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)
Upstream-commit: c786a8ee5e9db8f5f609cf8721bd1e1513fb0043
Component: engine
2014-09-16 19:24:25 +00:00
6556d7f015 engine.Env: comments and tests for Get()
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 6e0bc06018b28ac46689708343b8dd57cae772c2
Component: engine
2014-09-10 22:20:49 -04:00
e9ab736d16 move some io related utils to pkg/ioutils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 76212635b594d4472dd8d5b2e071fac416addbe7
Component: engine
2014-09-03 11:36:21 +03:00
f1ec175d76 Merge pull request #7800 from djbk/master
Cleanup: Typo in job.go
Upstream-commit: 426fbee81001cadd1231903fb7219121616fe814
Component: engine
2014-09-02 17:47:18 -07:00
475881edb2 Cleanup: Typo in job.go
Signed-off-by: Byung Kang <byungk91@gmail.com>
Upstream-commit: cc84ec3f6182a7af9ef881939305cf1ac13a383a
Component: engine
2014-09-02 19:37:14 -05:00
cc2787ae0d Some more style fixes
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 114838cbda38f4808d3a7a0d40b33d2ee445d158
Component: engine
2014-08-29 15:21:28 +04:00
fd70e8abe8 Added Test case for Engine shutdown
Docker-DCO-1.1-Signed-off-by: Rajdeep Dua <dua_rajdeep@yahoo.com> (github: rajdeepd)
Upstream-commit: 0800f8cc19732a41d8f04aaf42427399557afa54
Component: engine
2014-08-19 04:59:13 -07:00
230d6c3581 Workaround to avoid 5 second delay on graceful daemon restart
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 6aecdb4f8e73031f0deeac88a88ffc3fad9d5377
Component: engine
2014-08-13 21:40:25 +00:00
a74b20717e Engine.Shutdown only waits 5 seconds for active jobs to complete
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: eb79dc14fe45f3805d83e5e5e64b335da6389d6a
Component: engine
2014-08-06 17:56:12 +00:00
145b9864d4 Remove unused field from engine.Job
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 92105ea0fa774607ea4c7f487aedfd22eb5598bc
Component: engine
2014-08-06 17:56:12 +00:00
f56c09a5b4 Extra testing for engine.Shutdown
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 61eab759397a0915a0dd69de399d49d2a0ed0ba6
Component: engine
2014-08-06 17:56:12 +00:00
d8f9865870 Subsystems can register cleanup handlers with Engine.OnShutdown
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: d745067487fe2a750cfa2625ed7f652a56abc17c
Component: engine
2014-08-06 17:56:11 +00:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
5281f733c2 Change floats to ints recursively on env encoding
Fixes #6246
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 1d3d1c5d2b762a32fbee348702af96f9c00fff83
Component: engine
2014-06-24 23:39:26 +00:00
a93d5dc92d Benchmarks for engine/env
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 01b424028ed0ab7d673c7ae2221457ae12304557
Component: engine
2014-06-24 21:48:16 +04:00
172faefd3c 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)
Upstream-commit: f08cd445b0d2e44a4977a3bd0dca0a1cd4e76d2f
Component: engine
2014-06-18 17:39:57 +00:00
99dc4301cc remove unused beam, will be back later as libchan
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 384b60b940e07d37c1ff544168a2407513114d80
Component: engine
2014-06-11 19:09:55 +00:00