Commit graph

372 commits

Author SHA1 Message Date
Vincent Demeester
b2320d121c
Small cleanup in integration-cli/docker_utils.go 👼
- Move *one-shot* (one use) function where it is actually used (easier
  to know what's going on).
- Remove `pullImageIfNotExist` function as it might be an artifact
  from way back. We don't need it as we already have frozen/loaded
  image of busybox.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-28 23:00:32 +01:00
Vincent Demeester
def13fa23c
Clean integration-cli/utils.go from most of its content
Most of the code is now on pkg/integration.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-28 19:05:48 +01:00
Sebastiaan van Stijn
05dc9846e1
remove client-side for supported logging drivers
The `docker logs` command performed a
client-side check if the container's
logging driver was supported.

Now that we allow the client to connect
to both "older" and "newer" daemon versions,
this check is best done daemon-side.

This patch remove the check on the client
side, and leaves validation to the daemon,
which should be the source of truth.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-12-19 14:30:01 +01:00
Brian Goff
6ef1060cd0 Fix volume plugin refecounting on daemon restart
Ensures all known volumes (known b/c they are persisted to disk) have
their volume drivers refcounted properly.

In testing this, I found an issue with `--live-restore` (required since
currently the provided volume plugin doesn't keep state on restart)
where restorted plugins did not have a plugin client loaded causing a
panic when trying to use the plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-16 10:14:06 -05:00
Yong Tang
7feb2a17e4 Fix docker exec -u issue after docker daemon restart
This fix tries to address the issue raised in 29342 where
`docker exec -u` after docker daemon restart returns an error:
```
unable to find user test: no matching entries in passwd file
```

The reason was that `container.BaseFS` is not present after restart.

This fix adds the `daemon.Mount` during the restore to bring up the
`container.BaseFS`.

An integration test has been added to cover the changes.

This fix fixes 29342.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-13 22:36:30 -08:00
Vincent Demeester
c502fb49dc Use *check.C in StartWithBusybox, Start, Stop and Restart…
… to make sure it doesn't fail. It also introduce StartWithError,
StopWithError and RestartWithError in case we care about the
error (and want the error to happen).

This removes the need to check for error and make the intent more
clear : I want a deamon with busybox loaded on it — if an error occur
it should fail the test, but it's not the test code that has the
responsability to check that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-12 09:46:47 +01:00
Vincent Demeester
f4a34a1f06 Remove check.C field from daemon and Use errors package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-09 22:26:42 +01:00
Vincent Demeester
48de91a33f Extract daemon to its own package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-09 22:26:42 +01:00
Michael Crosby
47637b49a0 Convert err description to lower
Convert this to lower before checking the message of the error.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-08 14:42:54 -08:00
Sebastiaan van Stijn
a6688959b4 Merge pull request #26973 from allencloud/change-code-in-container-restore
change code in container restore
2016-10-21 18:53:37 -07:00
Yong Tang
d7be6b2deb Add config parameter to change stop timeout during daemon shutdown
This fix tries to add a daemon config parameter `--shutdown-timeout`
that specifies the timeout value to stop containers gracefully
(before SIGKILL). The default value is 15s.

The `--shutdown-timeout` parameter is added to daemon options and
config file. It will also be updated during daemon reload.

Additional test cases have been added to cover the change.

This fix fixes #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-18 08:07:50 -07:00
Vincent Demeester
91312f71aa Merge pull request #26882 from runcom/proxy-path
Specify userland proxy path
2016-10-07 09:44:39 +02:00
Antonio Murdaca
dd2e1947dc
daemon: add --userland-proxy-path flag
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-06 17:31:53 +02:00
Kenfe-Mickael Laventure
7e12c3bb99 Update containerd and runc
containerd: 837e8c5e1cad013ed57f5c2090c8591c10cbbdae
runc: 02f8fa7863dd3f82909a73e2061897828460d52f

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-05 14:47:15 -07:00
Alessandro Boch
a0af884d3a Respect --bridge=none
- Do not create the default "bridge" network
- Get rid of the docker0 bridge

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-10-03 11:08:34 -07:00
Akihiro Suda
7fb7a477d7 [nit] integration-cli: obey Go's naming convention
No substantial code change.

 - Api         --> API
 - Cli         --> CLI
 - Http, Https --> HTTP, HTTPS
 - Id          --> ID
 - Uid,Gid,Pid --> UID,PID,PID
 - Ipam        --> IPAM
 - Tls         --> TLS (TestDaemonNoTlsCliTlsVerifyWithEnv --> TestDaemonTLSVerifyIssue13964)

Didn't touch in this commit:
 - Git: because it is officially "Git": https://git-scm.com/
 - Tar: because it is officially "Tar": https://www.gnu.org/software/tar/
 - Cpu, Nat, Mac, Ipc, Shm: for keeping a consistency with existing production code (not changable, for compatibility)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-09-30 01:21:05 +00:00
allencloud
6184ff312d change code in container restore
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-30 02:44:21 +08:00
Stephen J Day
8e5ef8af5c
client: don't hide context errors
Instead of reformatting error from the request action, we wrap it,
allowing the cause to be recovered. This is important for consumers that
need to be able to detect context errors, such as `Cancelled` and
`DeadlineExceeded`.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-09-08 17:47:43 -07:00
Brian Goff
dc712b9249 restore migrating pre-1.7.0 volumes
This was removed in a clean-up
(060f4ae617) but should not have been.
Fixes issues with volumes when upgrading from pre-1.7.0 daemons.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-09-06 17:17:47 -04:00
Yong Tang
5c0fd2d06e Change related test from DockerSuite to DockerDaemonSuite in docker_cli_daemon_test.go
This fix is a follow-up of 26154. I did a grep on `integration-cli` and
found out that there are several tests in `docker_cli_daemon_test.go`
that still use `NewDaemon` instread of `DockerDaemonSuite`.

This fix changes related tests from DockerSuite to DockerDaemonSuite in
`docker_cli_daemon_test.go`.

With this fix, now `NewDaemon` is only called from `SetUpTest` on
various DockerXXXSuite. That should help maintain the test code base.

This fix is related to the comments in:
26115
24533.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-30 18:30:27 -07:00
Kenfe-Mickael Laventure
88bfa6ede8 Add integration test to check persistence of exitcode and error message
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-08-30 14:17:09 -07:00
Vincent Demeester
5168c93419 Merge pull request #23830 from ardnaxelarak/23345_remove_name_from_volume_create
remove --name flag from volume create
2016-08-26 21:52:07 +02:00
Brian Goff
20f99a8634 TestDaemonDiscoveryBackendConfigReload behavior
`TestDaemonDiscoveryBackendConfigReload` was doing some wierd things
with files, creating a file (directly in `./integration-cli`), removing
it, then creating a new file.
This is just weird, so fixed it to use a single file, file will go into
a temp dir so it doesn't pollute integration-cli.

It was also blindly sending a SIGHUP to the daemon process then sleeping
for 3 seconds.  This is racey, and slow.
Change this to look for the daemon-reload event in the event stream.
Reload logic is moved to a separate function and blocks (w/ a timeout)
waiting for the reload event to fire.

Runtime of the test is now ~0.5s on my machine, where as it was a
minimum of 3s due to the `time.Sleep` before.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-08-26 11:02:04 -04:00
Kara Alexandra
ba3f0bf0e7 Add option to specify name without --name in volume create
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-25 14:20:06 -07:00
Daniel Nephin
6e7405ebd4 Fix tests and windows service.
Support args to RunCommand
Fix docker help text test.
Fix for ipv6 tests.
Fix TLSverify option.
Fix TestDaemonDiscoveryBackendConfigReload
Use tempfile for another test.
Restore missing flag.
Fix tests for removal of shlex.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:36 -04:00
Daniel Nephin
243885808f Change to use c.Assert() instead of result.Assert()
Fix delete containers and make sure it prints errors correctly.
Rename Result.Fails to Result.Assert()
Create a constant for the default expected.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-23 15:12:36 -04:00
Daniel Nephin
d7022f2b46 Create a unified RunCommand function with Assert()
Remove some run functions and replace them with the unified run command.
Remove DockerCmdWithStdoutStderr
Remove many duplicate runCommand functions.
Also add dockerCmdWithResult()
Allow Result.Assert() to ignore the error message if an exit status is expected.
Fix race in DockerSuite.TestDockerInspectMultipleNetwork
Fix flaky test DockerSuite.TestRunInteractiveWithRestartPolicy

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-23 15:11:46 -04:00
Alexander Morozov
64605d709f Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
2016-08-10 11:07:15 -07:00
allencloud
0ead624473 add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-08-10 08:36:09 +08:00
Zhang Wei
3c2886d8a4 Move --rm to daemon side
`--rm` is a client side flag which caused lots of problems:
1. if client lost connection to daemon, including client crash or be
killed, there's no way to clean garbage container.
2. if docker stop a `--rm` container, this container won't be
autoremoved.
3. if docker daemon restart, container is also left over.
4. bug: `docker run --rm busybox fakecmd` will exit without cleanup.

In a word, client side `--rm` flag isn't sufficient for garbage
collection. Move the `--rm` flag to daemon will be more reasonable.

What this commit do is:
1. implement a `--rm` on daemon side, adding one flag `AutoRemove` into
HostConfig.
2. Allow `run --rm -d`, no conflicting `--rm` and `-d` any more,
auto-remove can work on detach mode.
3. `docker restart` a `--rm` container will succeed, the container won't
be autoremoved.

This commit will help a lot for daemon to do garbage collection for
temporary containers.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-08 22:46:53 +08:00
Daniel Nephin
fab2a3dc82 Ignore 'not a swarm error' when inspecting a task.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-03 12:22:07 -04:00
Daniel Nephin
c0d2f7b338 Remove unnecessary CmdWithArgs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-07-28 20:14:14 -04:00
lixiaobing10051267
8928677ea2 Add break after found = true
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-07-26 23:28:44 +08:00
Anusha Ragunathan
6d36431e23 Fix daemon tests.
Fix two test issues:
- pidof is not available in PATH on some Jenkins systems (rhel, centos)
  Use kill -0 instead.
- Cleanup after plugin test. This is a stop gap fix. The right way to
  fix this, is to shutdown the plugin on daemon shutdown path (except
  for the live-restore case). This will be done in a follow up PR.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-06-28 15:29:49 -07:00
Michael Crosby
48eba0bfe6 Merge pull request #23677 from anusha-ragunathan/mv_test_stable
Move daemon restart tests from experimental to stable.
2016-06-27 13:07:55 -07:00
Anusha Ragunathan
006d58d7e6 Add plugin restore tests.
Also live restore is stable now. So move experimental tests out to stable.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-06-22 19:04:26 -07:00
Kenfe-Mickael Laventure
69af7d0d13 Use "docker-runc" as alias for the default runtime
This also moves the variable holding the default runtime name from the
engine-api repository into docker repository

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-22 11:59:26 -07:00
nick
7135afa79b Fix misspell typos
Signed-off-by: nick <nicholasrusso@icloud.com>
2016-06-19 09:53:31 -07:00
Dmitri Shuralyov
8cf4133f37 integration-cli: Change "Dns" to "DNS".
This fixes a minor lint/style issue, improves consistency.

According to Go style, which this project follows, acronyms should have
a consistent case. Source: https://github.com/golang/go/wiki/CodeReviewComments#initialisms

See https://github.com/docker/docker/pull/11310#discussion_r67394302.

Signed-off-by: Dmitri Shuralyov <shurcooL@gmail.com>
2016-06-18 16:32:27 -07:00
Kenfe-Mickael Laventure
bd6317031b Fix TestRunWithRuntime* on arm
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 18:59:22 -07:00
Brian Goff
9c52b11e2a TestCleanupMountsAfterGracefulShutdown wait for daemon exit
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-06-14 17:14:53 -04:00
Kenfe-Mickael Laventure
7b2e5216b8 Add support for multiples runtimes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Sebastiaan van Stijn
496adadcec
Update TestHttpsInfoRogueCert for Go 1.7
The error message changed from

  remote error: bad certificate

To

  remote error: tls: bad certificate

In Go 1.7, so just checking for "bad certificate"
to make this test work on both Go 1.6 and 1.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-04 14:17:24 +02:00
allencloud
c1be45fa38 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 17:17:22 +08:00
Vincent Demeester
f87053b9c3
Use dockerd instead of docker daemon in integration-cli
Updating `integration-cli/daemon.go` to use `dockerd` instead of `docker
daemon` to start up the daemon.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-05-26 13:14:35 +02:00
Sebastiaan van Stijn
cd159fba85 Merge pull request #22952 from tophj-ibm/multiarch_daemon_test_fix
Multi-arch: fix TestBuildOnDisabledBridgeNetworkDaemon
2016-05-25 10:19:41 +02:00
Yong Tang
23821fe586 The option --dns, --dns-search, --dns-opt and --net=host should not be mutually exclusive.
This fix tries to address the issue raised in #21976 and allows
the options of `--dns`, `--dns-search`, `--dns-opt` and `--net=host`
to work at the same time.

The documentation has been updated and additional tests have been
added to cover this change.

This fix fixes #21976.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-05-24 16:03:26 -07:00
Christopher Jones
7832e2ae82 Multi-arch: fix TestBuildOnDisabledBridgeNetworkDaemon
Fixes the test by loading in the architecture specific busybox
image when the test daemon starts.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-05-24 16:33:49 -04:00
Chun Chen
a8d013495c Fix building image error if bridge network is disabled
Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-05-24 16:20:26 +08:00
Michael Crosby
31e903b0e1 Remove restart test
This test is not applicable anymore now that containers are not stopped
when the daemon is restored.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-23 15:57:23 -07:00
Yong Tang
7368e41c07 Docker pull/push with max concurrency limits.
This fix tries to address issues raised in #20936 and #22443
where `docker pull` or `docker push` fails because of the
concurrent connection failing.
Currently, the number of maximum concurrent connections is
controlled by `maxDownloadConcurrency` and `maxUploadConcurrency`
which are hardcoded to 3 and 5 respectively. Therefore, in
situations where network connections don't support multiple
downloads/uploads, failures may encounter for `docker push`
or `docker pull`.

This fix tries changes `maxDownloadConcurrency` and
`maxUploadConcurrency` to adjustable by passing
`--max-concurrent-uploads` and `--max-concurrent-downloads` to
`docker daemon` command.

The documentation related to docker daemon has been updated.

Additional test case have been added to cover the changes in this fix.

This fix fixes #20936. This fix fixes #22443.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-05-11 19:44:54 -07:00
Alexander Morozov
af60a9e599 Merge pull request #22511 from crosbymichael/update-runc-containerd
Update runc and containerd deps
2016-05-10 15:06:23 -07:00
Michael Crosby
6889c3276c Fix containerd proto for connection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-09 15:17:10 -07:00
Tonis Tiigi
47c353eb46 Clean loopbacks in TestDaemonNoSpaceLeftOnDeviceError
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-05-06 14:19:27 -07:00
Yong Tang
4b5404f15e Docker inspect gave default log options even when the option is emtpy.
This fix tries to addess the issue in #21956 where `docker inspect`
will overwrite the log config options with default option even when
the `--log-driver` is not empty and `--log-opt` is empty. In this
situation, `docker inspect` and `docker run` is different.

With the introduction of #21153, the `HostConfig` will always have
the correct log-driver and log-opt values.

However, the previous processing of `docker inspect` was not updated
after the change in #21153. This results in the incorrect behavior.

This fix addresses this issue by updating `docker inspect` to conform
to #21153 so the the behavior of `docker inspect` and `docker run` is
consistent.

A integration test has been added to cover this fix.

This fix fixes #21956. This fix is related to #21153.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-05-02 21:14:42 -07:00
Shijiang Wei
1790980ec6 inherit the daemon log options when creating containers
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2016-05-02 23:04:04 +08:00
Daniel Nephin
9e7651db4d Build two binaries client and daemon.
Add a proxy to support 'docker daemon'
Fix configFile option, and remove a test that is no longer relevant.
Remove daemon build tag.
Remove DOCKER_CLIENTONLY from build scripts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Change docker-daemon to dockerd.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-22 11:26:01 -04:00
Brian Goff
59b83d8aae Containerize TestDaemonNoSpaceLeftOnDeviceError
Why? Because the `mount` here will sometimes fail when run in
`debian:jessie`, which is what the environrment hosting the test suite
is running if run from the `Makefile`.
Also, why the heck not containerize it, all the things.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-19 17:16:18 -04:00
Vincent Demeester
8011228b53 Merge pull request #21634 from cpuguy83/add_beter_logging_for_TestDaemonNoSpaceleftOnDeviceError
More logs for `TestDaemonNoSpaceleftOnDeviceError`
2016-04-14 22:06:49 +02:00
Zhang Wei
51e42e6ee0 Fix ShouldRestart for on-failure handle
Currently if you restart docker daemon, all the containers with restart
policy `on-failure` regardless of its `RestartCount` will be started,
this will make daemon cost more extra time for restart.

This commit will stop these containers to do unnecessary start on
daemon's restart.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-10 15:44:47 +08:00
Anusha Ragunathan
c7076d2670 Add non-experimental daemon as a test requirement.
For test that should be exclusively run only in regular daemon builds
and not in the experimental version, add a requirement.

Verified using TestCleanupMountsAfterDaemonKill.
- On regular daemon, the test ran.
- On experimental daemon, the test skipped.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-04-07 14:46:32 -07:00
Sebastiaan van Stijn
ffee5588cd Merge pull request #21372 from anusha-ragunathan/ctrd-rebase
Update mount state of live containers after a daemon crash.
2016-03-30 23:10:04 -07:00
Brian Goff
5106c51666 More logs for TestDaemonNoSpaceleftOnDeviceError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-03-29 15:24:05 -07:00
Anusha Ragunathan
511a70583f Update mount state of live containers after a daemon crash.
Fix unmount issues in the daemon crash and restart lifecycle, w.r.t
graph drivers. This change sets a live container RWLayer's activity
count to 1, so that the RWLayer is aware of the mount. Note that
containerd has experimental support for restore live containers.

Added/updated corresponding tests.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-03-29 14:42:43 -07:00
Vincent Demeester
6eb3835995 Merge pull request #21529 from LK4D4/test_exit_early
integration-cli: exit early if daemon immedately crashed
2016-03-29 09:34:17 +02:00
allencloud
276a20dd42 upper case docker info details
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-28 18:47:04 +08:00
Alexander Morozov
0f217cead8 integration-cli: exit early if daemon immedately crashed
this reduces execution of TestInfoDiscoveryInvalidAdvertise from 11s to 0.2s

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-27 21:57:32 -07:00
Tibor Vass
009399dc8e Add docker- prefix to runc and containerd binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-23 00:52:16 -04:00
Tonis Tiigi
9c4570a958 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-03-18 13:38:32 -07:00
Tibor Vass
1c0474ed63 Merge pull request #20476 from wenchma/19425-TestDaemonStartWithDaemonCommand
Optimize slow bottleneck tests of TestDaemonStartWithDaemonCommand
2016-03-11 10:54:48 -05:00
Christopher Jones
66e558c16c Properly close and remove file in daemon test
Fixes a bug where a file would be created and not deleted in
DockerSuite.TestDaemonDiscoveryBackendConfigReload

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-03-04 14:22:30 -05:00
Wen Cheng Ma
b9ef2682b9 Optimize slow bottleneck tests of TestDaemonStartWithDaemonCommand
* Remvoe integration test of TestDaemonStartWithDaemonCommand
* Rewrite as unit test

Related issue #19425

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-03-01 14:05:39 +08:00
Brian Goff
ea6d2708e2 Merge pull request #20692 from coolljt0725/add_brnf_test_request
Add bridgeNfIptables and bridgeNfIp6tables test request
2016-02-29 15:16:27 -05:00
Antonio Murdaca
e44689139d integration-cli: remove not necessary -d again
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-02-28 13:48:15 +01:00
Antonio Murdaca
faf4604dac integration-cli: remove not necessary -d
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-02-27 18:27:25 +01:00
Lei Jitang
79843b727f Add bridgeNfIptables and bridgeNfIp6tables test request
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-02-26 19:53:35 -05:00
Arnaud Porterie
117a982d2e Merge pull request #20419 from aboch/cr
Allow passing global datastore to libnetwork and v0.7.0-dev1 vendoring
2016-02-18 17:39:46 -08:00
Madhu Venugopal
c9bec2be2a Config-reload IT
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-02-18 12:22:56 -08:00
Brian Goff
8e0e9e0f24 Fix net=none w/ TestDaemonNoSpaceleftOnDeviceError
Broken by bcb9adf49e

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-18 11:34:34 -05:00
Arnaud Porterie
a943c40150 Improve remote integration-cli tests
Progress toward being able to run integration-cli campaign using a
client hitting a remote host.

Most of these fixes imply flagging tests that assume they are running on
the same host than the Daemon. Also fixes the `contrib/httpserver` image
that couldn't run because of a dynamically linked Go binary inside the
busybox image.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2016-02-11 07:31:49 -08:00
Brian Goff
cfa806378e Merge pull request #20174 from tophj-ibm/remove-power-from-logrus-tests
PPC64LE: Remove testing logrus output from ppc64le
2016-02-10 09:07:47 -05:00
Christopher Jones
736e93a468 Remove testing logrus output from ppc64le
This removes two tests on ppc64le.

There is an old bug with a syscall on power #8653, that causes
logrus to default to using logfmt. These two tests look for
logrus format specific strings, and fail if they don't see it.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-02-09 18:02:18 -05:00
Shishir Mahajan
07184599f7 Tests for PR # 19123: daemon option (--storage-opt dm.basesize) for increasing the base device size on daemon restart
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-02-09 10:47:31 -05:00
David Calavera
9f315dd328 Add regression tests for client debug flag.
- Add client debug info to the `docker info` command.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-02 16:57:36 -05:00
David Calavera
898599171e Add test to make sure raw logs are properly activated.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-01 16:52:31 -05:00
Wen Cheng Ma
07d2c31810 Optimize slow bottleneck tests of TestDaemonCorruptedLogDriverAddress
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-01-26 14:53:10 +08:00
Brian Goff
997e61add9 Merge pull request #19658 from wenchma/19425-daemon_ipv6
Optimize slow bottleneck tests of TestDaemonIPv6FixedCIDR
2016-01-25 14:04:54 -05:00
Shijiang Wei
c983996e0b speed up DockerDaemonSuite.TestDaemonRestartWithContainerRunning
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2016-01-25 23:45:13 +08:00
Wen Cheng Ma
73849a5c82 Optimize slow bottleneck tests of TestDaemonIPv6FixedCIDR and TestDaemonIPv6FixedCIDRAndMac
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-01-25 23:43:49 +08:00
Morgan Bauer
bcb9adf49e
check the output, not the errcode
- errcode of 1 can be returned for cases other than the 'no space left' case

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2016-01-21 15:23:20 -08:00
David Calavera
db1d5f7ea3 Add test to verify that response hijacking always works over TLS.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-13 20:18:06 -05:00
Brian Goff
0f9f99500c Build names and links at runtime
Don't rely on sqlite db for name registration and linking.
Instead register names and links when the daemon starts to an in-memory
store.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-07 14:10:42 -05:00
Brian Goff
d3eca4451d Move responsibility of ls/inspect to volume driver
Makes `docker volume ls` and `docker volume inspect` ask the volume
drivers rather than only using what is cached locally.

Previously in order to use a volume from an external driver, one would
either have to use `docker volume create` or have a container that is
already using that volume for it to be visible to the other volume
API's.

For keeping uniqueness of volume names in the daemon, names are bound to
a driver on a first come first serve basis. If two drivers have a volume
with the same name, the first one is chosen, and a warning is logged
about the second one.

Adds 2 new methods to the plugin API, `List` and `Get`.
If a plugin does not implement these endpoints, a user will not be able
to find the specified volumes as well requests go through the drivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-05 16:28:38 -05:00
Alexander Morozov
2e3186ab06 Add ability to set cgroup parent for all containers
Fix #18022

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-04 15:16:25 -08:00
Michael Crosby
04234bd16a Merge pull request #18208 from cpuguy83/restart_links
Daemon Restart: attempt to wait for container deps
2016-01-04 14:36:00 -08:00
Alessandro Boch
aa97eee1a3 Properly initialize IpamConf structure in initBridgeDriver
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-30 15:44:50 -08:00
Brian Goff
19762da67e Daemon Restart: attempt to wait for container deps
This provides a best effort on daemon restarts to restart containers
which have linked containers that are not up yet instead of failing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-12-28 11:00:16 -05:00
Brian Goff
44d3f2f71a Make TestDaemonNoSpaceleftOnDeviceError linux only
Adds SameHostDaemon and DaemonIsLinux req's to
TestDaemonNoSpaceleftOnDeviceError

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-11-20 12:44:49 -05:00
Alexander Morozov
e2417e3e92 Merge pull request #17617 from askb/17168_pull_error_fix
Fix for #17168 issue
2015-11-17 16:10:44 -08:00
Antonio Murdaca
7929888214 Remove deprecated cli flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-15 10:40:01 +01:00
Anil Belur
4699ef8f87 Adding test for the fix #17168.
The test case creates a mount point, starts the daemon with the
graph dir pointing to the mount and initates a pull request. We should
be able to check for the error message when the mount point gets filled
during pull.

Signed-off-by: Anil Belur <askb23@gmail.com>
2015-11-14 16:24:45 +05:30
Tibor Vass
7a985cfafc Merge pull request #17890 from aboch/b6
Restore deterministic IPv6 from MAC behavior on default bridge network
2015-11-11 12:42:08 -05:00
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