Commit graph

220 commits

Author SHA1 Message Date
Alessandro Boch
095a8ac545 Restore IPv6 from MAC on default bridge network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-11-11 08:36:04 -08:00
Vincent Demeester
d6856db128 Merge pull request #17012 from fgimenez/9986-ipallocator-excludes-bridge-ip
Test to ensure that the bridge ip is excluded from the allocator pool
2015-11-11 10:42:13 +01:00
Alessandro Boch
c7cd659624 Fix fixed-cidr daemon option
- Logic is broken when gateway ip falls in ip-range
  and ip-range is not the first block in the network

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-11-09 15:51:46 -08:00
Alexander Morozov
e37e329074 Return nice client-side message for docker logs
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-06 11:40:48 -08:00
David Calavera
157b66ad39 Remove exec-driver global daemon option.
Each platform has only a driver now.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-05 17:09:58 -05:00
David Calavera
25682577c9 Extract network settings types for inspect.
Keeping backwards compatibility.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-27 19:16:21 -04:00
Federico Gimenez
e8da75d4a1 Integration test: bridge ip is excluded from the allocator pool
Signed-off-by: Federico Gimenez <fgimenez@coit.es>
2015-10-25 09:36:38 +01:00
Alessandro Boch
5b53839326 Add integ-test for fixed--cidr == bridge network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-22 14:12:46 -07:00
Tibor Vass
6a7c38a57d Merge pull request #16940 from coolljt0725/default_tls_host
Make default tls host work
2015-10-21 14:02:22 -04:00
Madhu Venugopal
37627427a2 Integration test for default bridge init with invalid cluster config
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-20 19:56:59 -07:00
Phil Estes
414cfe9467 Update Dockerfile to use the correct busybox:latest identifier
Also requires some tests to be updated which relied on behavior
of a busybox image that wasn't actually "busybox:latest"; meaning these
tests were unable to be verified/run against a real busybox:latest image
on a daemon.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-10-20 12:03:11 -04:00
Lei Jitang
fbb01b8162 Make default tls host work
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-19 21:17:37 +08:00
Alexandre Beslic
4ea3ff7061 Merge pull request #16910 from mavenugo/ipam
Vendoring libnetwork for the pluggable IPAM driver support
2015-10-13 14:41:19 -07:00
Madhu Venugopal
0f351ce364 Docker side changes for the newly introduced IPAM driver
* Made use of IPAM driver primitives for legacy IP configurations
* Replaced custom Generics with backend labels

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-13 10:52:59 -07:00
Lei Jitang
e38767e197 Fix docker daemon exit immediately after starting without -H option closes #16927
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-12 04:49:25 -04:00
Jessica Frazelle
ea3afdad61 add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-09 20:50:27 -04:00
Phil Estes
442b45628e Add user namespace (mapping) support to the Docker engine
Adds support for the daemon to handle user namespace maps as a
per-daemon setting.

Support for handling uid/gid mapping is added to the builder,
archive/unarchive packages and functions, all graphdrivers (except
Windows), and the test suite is updated to handle user namespace daemon
rootgraph changes.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-10-09 17:47:37 -04:00
Alexander Morozov
5eda566f93 Allocate resources for server API before daemon creation
It prevents occupying of those resources (ports, unix-sockets) by
containers.
Also fixed false-positive test for that case.

Fix #15912

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-05 09:32:08 -07:00
Jess Frazelle
23750fb802 Merge pull request #15862 from calavera/share_shm_and_mqueue
Share shm and mqueue between containers.
2015-09-24 11:23:59 -07:00
David Calavera
b1d2f52bb2 Improvements to the original sharing implementation.
- Print the mount table as in /proc/self/mountinfo
- Do not exit prematurely when one of the ipc mounts doesn't exist.
- Do not exit prematurely when one of the ipc mounts cannot be unmounted.
- Add a unit test to see if the cleanup really works.
- Use syscall.MNT_DETACH to cleanup mounts after a crash.
- Unmount IPC mounts when the daemon unregisters an old running container.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-23 12:07:24 -04:00
Tibor Vass
d572bab4a0 Merge pull request #16437 from runcom/invalid-logger-address
daemon: logger: error out on daemon start if invalid logger address
2015-09-21 14:53:47 -04:00
Antonio Murdaca
e3c472426f daemon: logger: error out on daemon start if invalid logger address
If an invalid logger address is provided on daemon start it will
silently fail. As syslog driver is doing, this check should be done on
daemon start and prevent it from starting even in other drivers.
This patch also adds integration tests for this behavior.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-20 16:20:25 +02:00
Lei Jitang
0b2091132a Fix --net none test closes #16356
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-09-18 20:49:36 -04:00
Jessica Frazelle
50d7fba775
Revert "Make daemon to start with no userlandproxy by default"
This reverts commit bf2b8ec816.

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-16 09:56:38 -07:00
Nalin Dahyabhai
e611a189cb Add log reading to the journald log driver
If a logdriver doesn't register a callback function to validate log
options, it won't be usable.  Fix the journald driver by adding a dummy
validator.

Teach the client and the daemon's "logs" logic that the server can also
supply "logs" data via the "journald" driver.  Update documentation and
tests that depend on error messages.

Add support for reading log data from the systemd journal to the
journald log driver.  The internal logic uses a goroutine to scan the
journal for matching entries after any specified cutoff time, formats
the messages from those entries as JSONLog messages, and stuffs the
results down a pipe whose reading end we hand back to the caller.

If we are missing any of the 'linux', 'cgo', or 'journald' build tags,
however, we don't implement a reader, so the 'logs' endpoint will still
return an error.

Make the necessary changes to the build setup to ensure that support for
reading container logs from the systemd journal is built.

Rename the Jmap member of the journald logdriver's struct to "vars" to
make it non-public, and to make it easier to tell that it's just there
to hold additional variable values that we want journald to record along
with log data that we're sending to it.

In the client, don't assume that we know which logdrivers the server
implements, and remove the check that looks at the server.  It's
redundant because the server already knows, and the check also makes
using older clients with newer servers (which may have new logdrivers in
them) unnecessarily hard.

When we try to "logs" and have to report that the container's logdriver
doesn't support reading, send the error message through the
might-be-a-multiplexer so that clients which are expecting multiplexed
data will be able to properly display the error, instead of tripping
over the data and printing a less helpful "Unrecognized input header"
error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
2015-09-11 16:50:03 -04:00
Jana Radhakrishnan
bf2b8ec816 Make daemon to start with no userlandproxy by default
This PR makes a user visible behavior change with userland
proxy disabled by default and rely on hairpin NAT to be enabled
by default. This may not work in older (unsupported) kernels
where the user will be forced to enable userlandproxy if needed.

      - Updated the Docs
      - Changed the integration-cli to start with userlandproxy
	desiabled by default.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-11 11:58:35 -07:00
Alessandro Boch
56fdb05258 Docker changes for libnetwork Sandbox
- Ground-work for integrating with user namespace support

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-02 17:24:56 -07:00
Brian Goff
b3b7eb2723 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-26 13:37:52 -04:00
Brian Goff
2cec06fbcd Merge pull request #13304 from coolljt0725/restart_daemon_with_paused_containers
Fix restart docker daemon with paused containers
2015-08-26 09:04:14 -04:00
Lei Jitang
9a9724ad56 Fix docker daemon restart with paused container.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-08-25 09:42:58 +08:00
Brian Goff
fd8b25c802 Merge pull request #15348 from tonistiigi/11008-always-unless-stopped-restart-policy
Add always-unless-stopped restart policy
2015-08-24 13:48:56 -04:00
Tonis Tiigi
10305dc5e8 Add unless-stopped restart policy
Fixes #11008

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-08-18 11:39:06 -07:00
Alexander Morozov
3f61002b05 Fix LogConfig.Config in inspect
Also add test for daemon-wide log-opt.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-08-17 15:27:44 -07:00
Alexander Morozov
960791ba60 Check syslog config on daemon start
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-08-17 14:29:45 -07:00
Veres Lajos
5146232723 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
2015-08-07 23:25:49 +01:00
John Howard
ac120567e8 Windows: Workaround for CI
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-08-05 11:20:30 -07:00
Antonio Murdaca
af59c80b4a test: daemon restart with containers running with restart always policy
manually stopped

If a container is running with a restart policy of always and it's
manually stopped, then on daemon restart it will be running.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-08-02 11:14:01 +02:00
David Calavera
9e9f3aa36b Merge pull request #15185 from aboch/vnd_lbn_1.8
Vendoring libnetwork 31139cdb513aea5ad1ed08b60d4350a68b4c96db
2015-07-31 08:58:41 -07:00
Doug Davis
5ced3ab323 Add a test to make sure that --tlsverify=false turn on tls in daemon
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-07-30 21:21:24 -07:00
Alessandro Boch
4964ab0821 Add test code to cover issue #14859
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-30 17:37:11 -07:00
Brian Goff
693ba98cb9 Don't pass check.C to dockerCmdWithError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-27 14:33:32 -04:00
Shishir Mahajan
e7fc632147 Add and modify tests for legacy and new daemon invokations
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-23 20:31:43 -04:00
Ben Firshman
6b3c928140 Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-07-22 14:03:50 +01:00
Sebastiaan van Stijn
50d2597e49 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
2015-07-22 09:02:00 +02:00
David Calavera
1c3cb2d31e Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-21 15:33:05 -07:00
Qiang Huang
668e2369cc dockerCmd when possible
Addresses: #14603

integration-cli/docker_cli_daemon_experimental_test.go (hqhq)
integration-cli/docker_cli_daemon_test.go (hqhq)
integration-cli/docker_cli_diff_test.go (hqhq)
integration-cli/docker_cli_events_test.go (hqhq)
integration-cli/docker_cli_events_unix_test.go (hqhq)
integration-cli/docker_cli_exec_test.go (hqhq)
integration-cli/docker_cli_exec_unix_test.go (hqhq)
integration-cli/docker_cli_experimental_test.go (hqhq)
integration-cli/docker_cli_export_import_test.go (hqhq)
integration-cli/docker_cli_help_test.go (hqhq)
integration-cli/docker_cli_history_test.go (hqhq)
integration-cli/docker_cli_images_test.go (hqhq)
integration-cli/docker_cli_import_test.go (hqhq)
integration-cli/docker_cli_info_test.go (hqhq)
integration-cli/docker_cli_inspect_test.go (hqhq)
integration-cli/docker_cli_kill_test.go (hqhq)

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-20 14:55:40 +08:00
David Calavera
a2621ac6da Merge pull request #14294 from mavenugo/bnone
fixed incorrect assumption on --bridge=none treated as disable network
2015-06-30 13:40:52 -07:00
Madhu Venugopal
c9328c6ccf fixed incorrect assumption on --bridge=none treated as disable network
libnetwork host, none and bridge driver initialization is incorrectly
disabled if the daemon flag --bridge=none. The expected behavior of
setting --bridge as none is to disable the bridge driver alone and let
all other modes to be operational.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-30 13:04:28 -07:00
Dave Tucker
2dfb7f3b7d integration-cli: Add Tests for IPv6 and Fixed CIDR
This patch adds tests for the `--ipv6` and `--fixed-cidr` daemon flags

Signed-off-by: Dave Tucker <dt@docker.com>
2015-06-29 14:45:00 +01:00
Brian Goff
5a6a33f7ac Fix DOCKER_TLS_VERIFY being ignored
DOCEKR_TLS_VERIFY was being ignored because we were just checking if the
`-tlsverify` flag was set, not the actual value, which is defaulted to
the value of `os.Getenv("DOCKER_TLS_VERIFY") != ""`

The problem that this specifically fixes is where the client has set the
`DOCKER_TLS_VERIFY` env var but is connecting to a daemon that is not
verifed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-06-16 12:04:00 -04:00
Michael Crosby
4750e1f77e Merge pull request #13784 from mrjana/cnm_integ
libnetwork: Add garbage collection trigger
2015-06-09 17:24:30 -07:00
Jana Radhakrishnan
c68e7f96f9 libnetwork: Add garbage collection trigger
When the daemon is going down trigger immediate
garbage collection of libnetwork resources deleted
like namespace path since there will be no way to
remove them when the daemon restarts.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-07 21:33:51 -07:00
Eric-Olivier Lamey
5fa60149e2 Restore --default-gateway{,-v6} daemon options.
This was added before the libnetwork merge, and then lost. Fixes #13755.

Signed-off-by: Eric-Olivier Lamey <eo@lamey.me>
2015-06-05 06:21:22 +00:00
David Calavera
04c6f09fbd Merge pull request #12400 from coolljt0725/kill_all_containers_on_daemon_shutdown
Ensure all the running containers are killed on daemon shutdown
2015-05-29 16:45:57 -07:00
Jessica Frazelle
1392f99a97 skip test on lxc
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-28 14:54:12 -07:00
Lei Jitang
bdb77078b5 Ensure all the running containers are killed on daemon shutdown
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-05-27 09:09:25 +08:00
Alexander Morozov
3cb14df68c Fix network with -b none
* Don't AllocateNetwork when network is disabled
* Don't createNetwork in execdriver when network is disabled

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-05-24 08:26:59 -07:00
David Calavera
81fa9feb0c Volumes refactor and external plugin implementation.
Signed by all authors:

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Signed-off-by: Luke Marsden <luke@clusterhq.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-21 20:34:17 -07:00
Jessie Frazelle
d29dc0b608 Merge pull request #13325 from LK4D4/cleanup_mounts
Fix Put without Get in overlay
2015-05-20 03:11:58 +02:00
Jana Radhakrishnan
d18919e304 Docker integration with libnetwork
- Updated Dockerfile to satisfy libnetwork GOPATH requirements.
    - Reworked daemon to allocate network resources using libnetwork.
    - Reworked remove link code to also update network resources in libnetwork.
    - Adjusted the exec driver command population to reflect libnetwork design.
    - Adjusted the exec driver create command steps.
    - Updated a few test cases to reflect the change in design.
    - Removed the dns setup code from docker as resolv.conf is entirely managed
      in libnetwork.
    - Integrated with lxc exec driver.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-19 22:40:19 +00:00
Jessie Frazelle
92c869cd12 Merge pull request #12437 from fmzhen/remove-regex-replace
Removal of the regex to replace ips
2015-05-19 22:59:17 +02:00
Alexander Morozov
3916561619 Fix Put without Get in overlay
It is called for example on daemon start after crash

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-05-19 09:32:23 -07:00
Mingzhen Feng
3ab7ceb5d7 Removal of the regex to replace ips
Signed-off-by: Mingzhen Feng <fmzhen@zju.edu.cn>
2015-05-19 10:15:18 +08:00
Doug Davis
a85ca8b7c4 add link between -D and --log-level=debug back in
Due to popular demand :-)
See #11965

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-14 10:29:49 -07:00
Antonio Murdaca
56847ec4d4 Merge pull request #13106 from duglin/HumanizeCliErrors
Use stderr instead of logrus for CLI error messages
2015-05-13 05:23:56 +02:00
Jessie Frazelle
36d995a291 Merge pull request #11965 from duglin/DEBUG
Remove use of "DEBUG" env var from CLI and de-couple -D from --log-level
2015-05-12 18:24:04 -07:00
Doug Davis
0024935f64 Use stderr instead of logrus for CLI error messages
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-12 17:22:41 -07:00
Alexander Morozov
08230703fd Fix api servers creation and daemon start order
* daemon creation wasn't parallel to request buffering
* it was possible that empty volume will be created in
  /var/run/docker.sock by some container

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-05-07 15:38:02 -07:00
Tibor Vass
0d0b42547e Merge pull request #12771 from runcom/say-bye-to-engine
Remove engine
2015-04-30 12:18:16 -04:00
Antonio Murdaca
f7e417ea5e Remove integration tests and port them to integration-cli
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-30 01:35:16 +02:00
Madhu Venugopal
1c073ec176 Moved explicit cleanups into defered action
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 11:41:13 -07:00
Madhu Venugopal
dd0666e64f Integration Tests for --icc=false & container Linking using --expose
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 10:16:31 -07:00
Madhu Venugopal
ba11929ebd Integration tests for --ip daemon option
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 09:55:49 -07:00
Madhu Venugopal
0e254411b1 Integration tests for --fixed-cidr daemon config
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 09:55:42 -07:00
Madhu Venugopal
9c325c3f54 Integration tests for --bip daemon flag
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 09:55:34 -07:00
Madhu Venugopal
f3f5ff9d83 Integration tests for --bridge daemon flag
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 09:55:25 -07:00
Doug Davis
534ed8c2d4 Remove use of "DEBUG" env var from CLI and decouple DEBUG from --log-level
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-29 06:20:33 -07:00
Alexander Morozov
57464c32b9 Implement daemon suite for integration-cli
For creating and stopping test daemons automatically.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-27 15:48:29 -07:00
David Mackey
3941623fbc trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
2015-04-27 13:35:08 -07:00
Srini Brahmaroutu
05013f1250 Move https integration tests as unit tests under client
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-04-23 15:40:46 +00:00
Alexander Morozov
dc944ea7e4 Use suite for integration-cli
It prints test name and duration for each test.
Also performs deleteAllContainers after each test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-21 10:28:52 -07:00
Alexander Morozov
181fea24aa Make daemon initialization in main goroutine
It is simplifies code and lead to next refactoring step, where daemon
will be incorporated to some structure which represents API.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-20 08:13:39 -07:00
Jessica Frazelle
9a87553e4f cleanup test wrong key.json leading to other failures
wait for container to be running before trying to kill it in daemon tests

Signed-off-by: Jessica Frazelle <jess@docker.com>
2015-04-13 16:58:44 -07:00
Evan Hazlett
6b40377c18 Merge pull request #12262 from YanFeng-Adam/daemon
A wrong key.json would remain if the TestDaemonwithwrongkey case fails. The issue would lead to failure of other cases.
2015-04-13 16:00:20 -04:00
Antonio Murdaca
db0ffba3b9 Remove job from wait
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-10 20:17:02 +02:00
Yan Feng
bfc68d10ed A wrong key.json would remain if the TestDaemonwithwrongkey case fails. The issue would lead to failure of other cases.
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
2015-04-10 11:10:26 -04:00
Yuan Sun
ef13dcd4dc add TestDaemonwithwrongkey test case
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-04-06 08:57:47 +08:00
Arnaud Porterie
02c2308e39 Properly stop test daemon in integration-cli
Always stop the test daemon in an attempt to fix race conditions in
subsequent tests.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-04-02 08:53:31 -07:00
paul
c5bf2145f1 Fix vet warning
Signed-off-by: Paul Mou <ppymou@gmail.com>
2015-03-25 20:31:02 -07:00
Brian Goff
16309bef63 Add integration test for unix sock cleanup
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-03-20 12:34:35 -04:00
Phil Estes
9d5eab1873 Merge pull request #11453 from duglin/HideDaemonDots
Hide dots on daemon startup when loglevel != info
2015-03-19 10:10:18 -04:00
Jessie Frazelle
a5269223a7 Merge pull request #11320 from estesp/fix-daemon-startup
Fix daemon shutdown on error after rework of daemon startup
2015-03-17 19:04:25 -07:00
Doug Davis
88dc6cc2df Hide dots on daemon startup when loglevel != info
When the deamon starts up with log level set to INFO it will show something
like this:
```
INFO[0000] Loading containers: start.
................................................................
INFO[0000] Loading containers: done.
```
where the dots represent containers in the system.
When you run with log level set to "error" it will still show the dots
w/o the "Loading..." lines before and after which looks really odd.
This PR will fix it so that the dots are only shown IFF the "Loading..."
lines are also shown

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-17 17:27:53 -07:00
Phil Estes
459e58ffc9 Fix daemon shutdown on error after rework of daemon startup
Currently the daemon will not stop on error because the serve API job is
blocking the channel wait for daemon init.  A better way is to run the
blocking serve API job as a goroutine and make sure that error
notification gets back to the main daemon thread (using the already
existing channel) so that clean shutdown can occur on error.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-17 14:15:00 -04:00
Alexander Morozov
bdf3a0295d Fail docker logs on all logging drivers apart from 'json-file'
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 15:02:09 -07:00
Alexander Morozov
dd6d2cd660 Tests for --log-driver options
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-13 12:13:37 -07:00
Yuan Sun
906974b185 correct some daemon spelling mistakes
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-03-13 05:14:56 -04:00
Michael Crosby
5494432f91 Merge pull request #11331 from jfrazelle/update-logrus
Update logrus to 0.6.6
2015-03-11 16:18:22 -07:00
Brian Goff
c5c72cf151 Persist container to disk after rename
Fixes #11315

After rename occured the graphdb was updated but the container struct
was never commited back to disk, so on daemon restart it loads the old
name again.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-03-11 12:39:31 -07:00
Jessica Frazelle
89e2e5fc55 Update logrus to 0.6.6
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-03-11 11:29:13 -07:00
Jessica Frazelle
80d585b0c7 Skip new ulimits test on lxc
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-03-04 08:28:32 -08:00
Brian Goff
3f39050637 Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-02-25 19:37:43 -05:00
Ahmet Alp Balkan
70407ce40c Better test cleanup with defer
This fixes a few misuses of `deleteAllContainers()` cleanup
method in integration-cli suite by moving call to the
beginning of the method and guaranteeing their execution
(including panics) with `defer`s.

Also added some forgotten cleanup calls while I'm at it.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-20 14:04:36 -08:00
Derek McGowan
0eed1f4d8d Defer creation of trust key file until needed
Fixes #10442

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-29 13:46:12 -08:00
Brian Goff
b54305ae23 Do not return err on symlink eval
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-26 15:22:32 -05:00
Derek McGowan
42612ff6db Add key migration integration test
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-22 10:51:04 -08:00
Derek McGowan
a34a7930b5 Add TODO lines for windows
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-22 10:29:15 -08:00
Derek McGowan
06af013f8b Fix daemon key file location
Fixes #10233

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-21 16:28:19 -08:00
Brian Goff
e744b0dcba Fix volume ref restore process
Fixes #9629 #9768

A couple of issues:

1) Volume config is not restored if we couldn't find it with the graph
driver, but bind-mounts would never be found by the graph driver since
they aren't in that dir

2) container volumes were only being restored if they were found in the
volumes repo, but volumes created by old daemons wouldn't be in the
repo until the container is at least started.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-20 15:54:56 -05:00
Arnaud Porterie
f3ed42286e Enable test-integration-cli for Windows platform
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2014-12-20 16:40:40 -08:00
Michael Crosby
21bba5d93a Merge pull request #9181 from icecrime/allocate_daemon_ports
Allocate daemon listening ports
2014-12-17 18:01:20 -08:00
Alexandr Morozov
0d70ad1c72 Fix race in TestDaemonRestartWithVolumesRefs
Sometimes rm begins before process death, but Kill called already after
it, so we get error - no such process.

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-12-10 20:55:51 -08:00
Arnaud Porterie
7c225333f2 Allocate daemon listening ports
Mark the daemon listening ports as allocated in the portallocator in
order to prevent containers from exposing this port themselves.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2014-11-19 23:34:27 -08:00
Doug Davis
2facc04673 Add --log-level support
Next steps, in another PR, would be:
- make all logging go through the logrus stuff
- I'd like to see if we can remove the env var stuff (like DEBUG) but we'll see

Closes #5198

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-15 09:00:48 -08:00
Doug Davis
0cef21cfba Cleanup some integration-cli output
I noticed a few things that were bugging me in the output
of the integration-cli tests.
- one of the tests used println to stdout so we had garage sent to the screen
- some of the test, in their final log message, didn't include the name of
  the group/file e.g.  daemon - run,iptables   was just   run,iptables

And yes, I noticed this because I'm anal :-)  but also because we should keep
the output of the tests as clean as possible so its easy to spot it when
things go bad.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-11 08:44:32 -08:00
Jessica Frazelle
d98b117962 Add test for #8307.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-29 10:59:20 -07:00
Phil Estes
1262b5f605 Gracefully handle network bridge without IP association at startup
Addresses #8444

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2014-10-23 16:19:12 -04:00
Jessica Frazelle
3893e220e8 Setting iptables=false should propagate to ip-masq=false
Signed-off-by: Jessica Frazelle <jess@docker.com>
2014-10-16 11:52:14 -07:00
Brian Goff
9acf7c765c Restore volume refs after daemon restart
Volume refs were not being restored on daemon restart.
This made it possible to remove a volume being used by other containers
after a daemon restart.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-08 14:17:27 -04:00
Tibor Vass
a9971a89cc Add TestDaemonRestartWithRunningContainersPorts
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-09-02 12:13:21 -07:00