Commit Graph

286 Commits

Author SHA1 Message Date
6fda96cea6 Fix network connectivity problem for non-root users
If a container was started with a non-root user the container
may not be able to resolve DNS names because of too restrictive
permission in the /etc/resolv.conf container file. This problem
is in how this file gets created in libnetwork and ths PR
attempts to fix the issue by vendoring in the libnetwork code
with the fix.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: afd901e408d8d4ed00707c545ae985bc637a1979
Component: engine
2015-05-20 17:51:20 +00:00
7bb1c9e819 Test for two containers in --net=host
This is test for regression which was encountered during libnetwork
merging.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 7e5902c92d9a01d653a97685376def427e1f0750
Component: engine
2015-05-20 09:35:28 -07:00
e61b33bc5e Removed deleteContainer calls
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
Upstream-commit: 086b514f6afb1eacc0683baa3472c80022f6e7e2
Component: engine
2015-05-20 08:38:23 +02:00
13426de5e6 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>
Upstream-commit: d18919e304c240df84502cdcc5ed655d92d12d4f
Component: engine
2015-05-19 22:40:19 +00:00
2b5ebf7133 Merge pull request #13282 from duglin/RemoveBash
Remove use of 'bash' from our tests
Upstream-commit: aac645ae047601fed1550c9d59d7c8ea978203b0
Component: engine
2015-05-18 13:06:21 -07:00
1ea64dbe6e Merge pull request #13279 from hqhq/hq_use_inspectfield
Use inspectField to simplify code
Upstream-commit: ccf02a9f77be7732f65fe435281cea192e6abcad
Component: engine
2015-05-18 14:53:37 -04:00
7232d6b354 Remove use of 'bash' from our tests
Not 100% sure why our Windows test don't complain about some of these,
I'm guessing it because we have bash as part of some git package, but
either way we really shouldn't require bash to run our tests unless we
really need to - which in these cases we don't

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 3b1f73fbcd2ed938c499893f318467f14b63085a
Component: engine
2015-05-18 11:29:08 -07:00
9e12a52ca0 Use inspectField to simplify code
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 74f8a4eca4d504867aaea63a35ef1e491d332f74
Component: engine
2015-05-18 10:06:13 +08:00
2a80100987 Clean tests from not needed inspect call
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: a268e36719e38b91a4ece84e3fdb742ed36feac3
Component: engine
2015-05-16 18:12:54 +02:00
6d5c4d91dd Merge pull request #13196 from crosbymichael/update-libocntainer-may13
Update libcontainer to a37b2a4f152e2a1c9de596f54c0
Upstream-commit: b2ad9314a2e9bce481275c8d3c08e5e1b9f04523
Component: engine
2015-05-14 10:49:25 -07:00
ab675e423e Merge pull request #12667 from ibuildthecloud/host-uts
Add --uts=host to allow sharing the UTS namespace
Upstream-commit: ed257420025772acc38c51b0f018de3ee5564d0f
Component: engine
2015-05-13 18:30:32 -07:00
dc9bbf77b5 Add --uts=host to allow sharing the UTS namespace
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: f2e5207fc989288ad136d48222df8e7754eb0e9b
Component: engine
2015-05-13 17:56:32 -07:00
2df1795660 Update test for /sys mounting
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 677d76cd4aadf7514a3ba4e6761880fc3817f573
Component: engine
2015-05-13 15:02:53 -07:00
28e112fb4d Merge pull request #13183 from runcom/fix-typo-tests-grouping
Fix typo to run tests grouped by RunUnprivileged
Upstream-commit: ebe9a854869d1b5470e67e3657a62432e36680a3
Component: engine
2015-05-13 11:33:14 -07:00
0ea0631fe7 Fix typo to run tests grouped by RunUnprivileged
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: a36f6a140bb7987c18a8177115cbc315672f9e53
Component: engine
2015-05-13 14:24:54 +02:00
5be78509f7 integcli: change Dettach to Detach
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: fdec5197f145a1aa18329337746f6a94389da0a1
Component: engine
2015-05-13 12:49:19 +03:00
2e83148ffd Use stderr instead of logrus for CLI error messages
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0024935f641ab596732f9162d3eab795bbc2ae06
Component: engine
2015-05-12 17:22:41 -07:00
560ba9b809 add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: dccb8b5c339e218222bae4ce74bbeccb9e020c82
Component: engine
2015-05-09 10:02:46 +08:00
7ea0137fad fix lxc because it doesnt have the hardened libcontainer stuff
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 52118df432353dee2a37dd284462c4c021174a50
Component: engine
2015-05-07 17:40:37 -07:00
92cec4b2c1 Merge pull request #11516 from coolljt0725/add_show_error_set_some_flag_in_container_netmode
add support --net=container with --mac-address, --add-host error out
Upstream-commit: 6b6a26c7697978bf7d43fec11d14ef6ee7e3e4d6
Component: engine
2015-05-07 17:13:32 -07:00
5c2686119c Merge pull request #11802 from hqhq/hq_add_blkio_weight
add blkio.weight support
Upstream-commit: de32f5c431bbdb56d6a446af0e5660fae9539bd8
Component: engine
2015-05-07 17:10:39 -07:00
9fb1f7589d Merge pull request #12175 from dqminh/fix-allocate-port
#12148: sort ports mapping before allocating
Upstream-commit: e03ac8d5b98f525c3d32bb5a6ac84b2c5717a0dc
Component: engine
2015-05-07 17:04:20 -07:00
149aebf1ee bump version back to 1.7.0-dev
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 2c2f6fd2728067a5d3ab6ea393d8b5593de4bc0c
Component: engine
2015-05-07 15:42:36 -07:00
ac6f208e83 Allow libcontainer to eval symlink destination
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add tests for mounting into /proc and /sys

These two locations should be prohibited from mounting volumes into
those destinations.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f25bbedc85e8a99c1389dbe8f48436907ce24526
Component: engine
2015-05-07 14:43:39 -07:00
c87ab46f22 Mask reads from timer_stats and latency_stats
These files in /proc should not be able to be read as well
as written to.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a7a51306b1459a67da3a9cbbe8c9f80d3950c084
Component: engine
2015-05-07 14:42:23 -07:00
54739fa6d1 Mount RO for timer_stats and latency_stats in proc
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 27ae108b4eda48a621afc5bf2157ef11c314a858
Component: engine
2015-05-07 14:42:23 -07:00
50f626562d Prevent write access to /proc/asound
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	integration-cli/docker_cli_run_test.go
Upstream-commit: d87da59c79eabb794087f731d3ad51ea98f7a3cc
Component: engine
2015-05-07 14:42:23 -07:00
2ee6387cbc Merge pull request #12165 from icecrime/optional_userland_proxy
Optional userland proxy
Upstream-commit: 74bfa3675353aaf10ca760e82a79d758bea0ff6b
Component: engine
2015-05-07 14:01:16 -07:00
4f3515319b add blkio.weight support
We can use this to control block IO weight of a container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: f133f11a7d25e6262558dd733afaa95ddd1c7aee
Component: engine
2015-05-07 11:55:58 +08:00
49e7e90010 Add support --net=container with --mac-address,--add-host error out
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 0e08e9aca14a4ca7142fa4649983302d93b55dab
Component: engine
2015-05-05 19:28:40 +08:00
d7e8665b03 Add --userland-proxy daemon flag
The `--userland-proxy` daemon flag makes it possible to rely on hairpin
NAT and additional iptables routes instead of userland proxy for port
publishing and inter-container communication.

Usage of the userland proxy remains the default as hairpin NAT is
unsupported by older kernels.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f42348e18f73d1d775d77ac75bc96466aae56d7c
Component: engine
2015-05-04 16:07:45 -07:00
141582c6c7 Make /etc/hosts, /etc/resolv.conf, /etc/hostname read only if --read-only is enable
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 7d371c0b470334189720840854b2d5acbb1c7909
Component: engine
2015-05-04 21:30:52 +02:00
17d88307f9 sort ports mapping before allocating
prioritize the ports with static mapping before dynamic mapping. This removes
the port conflicts when we allocate static port in the reserved range
together with dynamic ones.
When static port is allocated first, Docker will skip those when determining
free ports for dynamic ones.

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: cd2b019214eb1978ae267786668dc7a8a3702679
Component: engine
2015-04-30 02:18:04 +00:00
6982f607b4 c.Fatal won't fail and exit test inside a goroutine, errors should be handled outside with a channel
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4203230cbbf46238e38099c9073bdcad5f69a63f
Component: engine
2015-04-29 17:02:22 +02:00
ae74d9f34f trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
Upstream-commit: 3941623fbc3fa724d61f53121513ffd87d03b61c
Component: engine
2015-04-27 13:35:08 -07:00
270e43ec62 Prevent deadlock on attempt to use own net
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: f30d1c1835618eadea5d0a68d1301dffd9f09b22
Component: engine
2015-04-27 14:57:37 +01:00
c48fdf0abd Implement teardown removeAllImages
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a9688cdca5577d6db65d76f38bcbe4c1e6f5994f
Component: engine
2015-04-24 10:37:21 -07:00
1c64e12359 Merge pull request #11839 from brahmaroutu/template_11641
Allow go template to work properly with inspect …
Upstream-commit: 799cf056e7f672f987b0b44adf0868ce56caab8b
Component: engine
2015-04-23 13:07:40 -07:00
12be8c3158 Allow go template to work properly with inspect
Closes #11641

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 231d362db73310a5243a72dcdb6df2df57c74488
Component: engine
2015-04-23 18:25:18 +00:00
dd4b0467ca Remove deleteAllContainers call in test
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: ee7a7b07e752c56bbe1b941feb1e4313275d68c2
Component: engine
2015-04-23 16:32:50 +02:00
1884ef3b9b 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>
Upstream-commit: dc944ea7e48d11a2906e751d3e61daf08faee054
Component: engine
2015-04-21 10:28:52 -07:00
cff18dc122 Merge pull request #10736 from coolljt0725/add_cpu_limit
Add support cpu cfs_quota
Upstream-commit: 17d5450bc31e81c22e8ccba806294e4d744af275
Component: engine
2015-04-20 17:55:01 -07:00
e0b5db7169 Merge pull request #12450 from brahmaroutu/integration_test3_12255
Port test from integration tests - test low memory on create
Upstream-commit: 435643545c4b2c90e2a0a264527f6cc190d925cb
Component: engine
2015-04-20 17:27:17 -04:00
97fb2745d9 Port test from integration tests
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 1a35b16b08ef5a8b0764e5a383f36d5572f20dfe
Component: engine
2015-04-20 17:57:53 +00:00
e52ab0e055 fix typo
Signed-off-by: buddhamagnet <buddhamagnet@gmail.com>
Upstream-commit: cdd5d5e4c3fe241d178c09edb521ae91689b55df
Component: engine
2015-04-20 18:56:21 +01:00
f8f4bcdb38 Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: dcc50e1d593fd7995189872791c6d7a013f16970
Component: engine
2015-04-20 08:16:47 -07:00
ad529b2798 Merge pull request #12466 from robertabbott/fix_dockerCmd
Removed unnecessary error output from dockerCmd
Upstream-commit: 5fd378c0d1d97601c7cfab6a62bb8da031a0001d
Component: engine
2015-04-17 15:15:34 -07:00
5e15f55a29 Removed unnecessary error output from dockerCmd
Changed method declaration. Fixed all calls to dockerCmd
method to reflect the change.

resolves #12355

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
Upstream-commit: 621b601b3c602aab5ef0f07903fdf413881bb261
Component: engine
2015-04-17 09:11:14 -07:00
6488f10044 Remove builtins
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: a0bf80fe0372196812a9cb295f209c08f8037601
Component: engine
2015-04-17 14:27:38 +02:00
4f6ebaa34e add support for cpuset.mems
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8077b2fb805c78cee642d8350df88227c6414960
Component: engine
2015-04-15 09:33:46 +08:00