Commit graph

286 commits

Author SHA1 Message Date
Jana Radhakrishnan
afd901e408 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>
2015-05-20 17:51:20 +00:00
Alexander Morozov
7e5902c92d 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>
2015-05-20 09:35:28 -07:00
Lorenzo Fontana
086b514f6a Removed deleteContainer calls
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
2015-05-20 08:38:23 +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
Michael Crosby
aac645ae04 Merge pull request #13282 from duglin/RemoveBash
Remove use of 'bash' from our tests
2015-05-18 13:06:21 -07:00
Brian Goff
ccf02a9f77 Merge pull request #13279 from hqhq/hq_use_inspectfield
Use inspectField to simplify code
2015-05-18 14:53:37 -04:00
Doug Davis
3b1f73fbcd 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>
2015-05-18 11:29:08 -07:00
Qiang Huang
74f8a4eca4 Use inspectField to simplify code
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-05-18 10:06:13 +08:00
Antonio Murdaca
a268e36719 Clean tests from not needed inspect call
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-16 18:12:54 +02:00
Alexander Morozov
b2ad9314a2 Merge pull request #13196 from crosbymichael/update-libocntainer-may13
Update libcontainer to a37b2a4f152e2a1c9de596f54c0
2015-05-14 10:49:25 -07:00
Sebastiaan van Stijn
ed25742002 Merge pull request #12667 from ibuildthecloud/host-uts
Add --uts=host to allow sharing the UTS namespace
2015-05-13 18:30:32 -07:00
Darren Shepherd
f2e5207fc9 Add --uts=host to allow sharing the UTS namespace
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-05-13 17:56:32 -07:00
Michael Crosby
677d76cd4a Update test for /sys mounting
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-05-13 15:02:53 -07:00
Jessie Frazelle
ebe9a85486 Merge pull request #13183 from runcom/fix-typo-tests-grouping
Fix typo to run tests grouped by RunUnprivileged
2015-05-13 11:33:14 -07:00
Antonio Murdaca
a36f6a140b Fix typo to run tests grouped by RunUnprivileged
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-13 14:24:54 +02:00
unclejack
fdec5197f1 integcli: change Dettach to Detach
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-05-13 12:49:19 +03: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
Ma Shimiao
dccb8b5c33 add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-05-09 10:02:46 +08:00
Jessica Frazelle
52118df432 fix lxc because it doesnt have the hardened libcontainer stuff
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-07 17:40:37 -07:00
Jessie Frazelle
6b6a26c769 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
2015-05-07 17:13:32 -07:00
Jessie Frazelle
de32f5c431 Merge pull request #11802 from hqhq/hq_add_blkio_weight
add blkio.weight support
2015-05-07 17:10:39 -07:00
Jessie Frazelle
e03ac8d5b9 Merge pull request #12175 from dqminh/fix-allocate-port
#12148: sort ports mapping before allocating
2015-05-07 17:04:20 -07:00
Jessica Frazelle
2c2f6fd272 bump version back to 1.7.0-dev
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-07 15:42:36 -07:00
Michael Crosby
f25bbedc85 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>
2015-05-07 14:43:39 -07:00
Michael Crosby
a7a51306b1 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>
2015-05-07 14:42:23 -07:00
Michael Crosby
27ae108b4e Mount RO for timer_stats and latency_stats in proc
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-05-07 14:42:23 -07:00
Michael Crosby
d87da59c79 Prevent write access to /proc/asound
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	integration-cli/docker_cli_run_test.go
2015-05-07 14:42:23 -07:00
Jessie Frazelle
74bfa36753 Merge pull request #12165 from icecrime/optional_userland_proxy
Optional userland proxy
2015-05-07 14:01:16 -07:00
Qiang Huang
f133f11a7d 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>
2015-05-07 11:55:58 +08:00
Lei Jitang
0e08e9aca1 Add support --net=container with --mac-address,--add-host error out
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-05-05 19:28:40 +08:00
Arnaud Porterie
f42348e18f 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>
2015-05-04 16:07:45 -07:00
mauriyouth
7d371c0b47 Make /etc/hosts, /etc/resolv.conf, /etc/hostname read only if --read-only is enable
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-04 21:30:52 +02:00
Daniel, Dao Quang Minh
cd2b019214 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>
2015-04-30 02:18:04 +00:00
Antonio Murdaca
4203230cbb 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>
2015-04-29 17:02:22 +02:00
David Mackey
3941623fbc trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
2015-04-27 13:35:08 -07:00
Aidan Hobson Sayers
f30d1c1835 Prevent deadlock on attempt to use own net
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2015-04-27 14:57:37 +01:00
Alexander Morozov
a9688cdca5 Implement teardown removeAllImages
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 10:37:21 -07:00
Alexander Morozov
799cf056e7 Merge pull request #11839 from brahmaroutu/template_11641
Allow go template to work properly with inspect …
2015-04-23 13:07:40 -07:00
Srini Brahmaroutu
231d362db7 Allow go template to work properly with inspect
Closes #11641

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-04-23 18:25:18 +00:00
Antonio Murdaca
ee7a7b07e7 Remove deleteAllContainers call in test
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 16:32:50 +02: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
Jessie Frazelle
17d5450bc3 Merge pull request #10736 from coolljt0725/add_cpu_limit
Add support cpu cfs_quota
2015-04-20 17:55:01 -07:00
Phil Estes
435643545c Merge pull request #12450 from brahmaroutu/integration_test3_12255
Port test from integration tests - test low memory on create
2015-04-20 17:27:17 -04:00
Srini Brahmaroutu
1a35b16b08 Port test from integration tests
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-04-20 17:57:53 +00:00
buddhamagnet
cdd5d5e4c3 fix typo
Signed-off-by: buddhamagnet <buddhamagnet@gmail.com>
2015-04-20 18:56:21 +01:00
Lei Jitang
dcc50e1d59 Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-04-20 08:16:47 -07:00
Arnaud Porterie
5fd378c0d1 Merge pull request #12466 from robertabbott/fix_dockerCmd
Removed unnecessary error output from dockerCmd
2015-04-17 15:15:34 -07:00
bobby abbott
621b601b3c 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>
2015-04-17 09:11:14 -07:00
Antonio Murdaca
a0bf80fe03 Remove builtins
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-17 14:27:38 +02:00
Qiang Huang
8077b2fb80 add support for cpuset.mems
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-15 09:33:46 +08:00