Commit Graph

742 Commits

Author SHA1 Message Date
Milos Gajdos 7075dd2cc2 Introducing macvtap device to netlink package
Small refactoring of MacVlan calls. Adds tests, too.

Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-11-21 15:44:15 +00:00
Mrunal Patel 84c1636580 Merge pull request #274 from crosbymichael/revert-hairpin-nat
Remove hairpin nat on veth create
2014-11-20 13:54:10 -08:00
Michael Crosby 378491e907 Remove hairpin nat on veth create
Writing to this file within /sys is casuing some issues for
older kernels, specifically with 2.6.xx, where the write is failing
because /sys is becoming ro.  We will continue to work on the 2.6 issues
but for the time being we cannot ship this with it enabled as it's
breaking all container runs.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-19 17:08:49 -08:00
Mrunal Patel 101dff031b Merge pull request #271 from crosbymichael/always-set-cpuset
libcontainer: setup cpuset cgroup by default
2014-11-18 18:13:03 -08:00
Michael Crosby 75093be3c9 Always join fs.Cpuset reguardless of value
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-17 19:06:20 -08:00
Qiang Huang 9c7bd7cd9e libcontainer: setup cpuset cgroup by default
Currently if we don't use --cpuset, the cpuset cgroup is not
created, it's bad if we want to modify cpuset config subsequently,
change the behavior to make it right.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2014-11-17 19:06:20 -08:00
Victor Marmol 28cb5f9dfd Merge pull request #267 from crosbymichael/cgroup-paths
Use cgroup paths for stats and removal
2014-11-17 12:05:56 -08:00
Michael Crosby 5b623a6e43 Remove cgutil cli application as it is not being used
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-17 11:56:19 -08:00
Michael Crosby 29b1d2b23f Move RemovePaths into cgroups pkg for reuse
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-17 11:56:19 -08:00
Michael Crosby bc7efa6b81 Have cgroup.Apply return paths to setup cgroups
There is no reason to have a special type returned from the cgroups
Apply function for getting the paths and cleanup.  With access to the
paths we can just delete what we need.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-17 11:56:19 -08:00
Michael Crosby 5cacd48132 Remove systemd.GetStats
Because we are using the paths that are created when we initially setup
cgroups for a container we no longer have to dynamically generates them
when a user requests stats.  This allows us to fully use the fs stats
code without having system create it's paths.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-17 11:56:19 -08:00
Donald Huang 6c6808e5bf Change arguments to fs.GetStats to be map[string]string
Allows us to remove systemd.GetPaths later

Signed-off-by: Donald Huang <don.hcd@gmail.com>
2014-11-17 11:56:19 -08:00
Mrunal Patel 05661b16b2 Merge pull request #269 from aholler/master
Use SYS_SETUID32 for system.Setuid() on Linux for ARM
2014-11-17 09:47:00 -08:00
Alexander Holler def2a7b14e Use SYS_SETUID32 for system.Setuid() on Linux for ARM
Besides possible other problems 16bit UIDs might be disabled by the kernel
configuration on Linux for ARM (see CONFIG_UID16).

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2014-11-17 14:16:32 +01:00
Mrunal Patel 3f17f897c2 Merge pull request #268 from crosbymichael/sethostname
Provide better sethostname error message
2014-11-15 09:10:30 -08:00
Michael Crosby 933fc88943 Provide better sethostname error message
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-14 17:46:11 -08:00
Michael Crosby 3496a63d87 Merge pull request #265 from crosbymichael/fix-dind
Update the path to project from hack
2014-11-14 15:52:21 -08:00
Michael Crosby 1272b74cc0 Update the path to project from hack
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-14 15:43:19 -08:00
Michael Crosby 38f761cf16 Merge pull request #264 from dqminh/fix-exec-env
Set correct env variables for `docker exec` commands
2014-11-14 14:59:55 -08:00
Daniel, Dao Quang Minh f61288fe37 use os.Environ() to set exec command's env
because `LoadContainerEnvironment` is already run, os.Environ() will return the
correct environment variables for the exec command (i.e. removed duplicated
envs, set HOME for user etc...)

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-11-14 12:51:14 -05:00
Michael Crosby 1c5d836b05 Merge pull request #262 from hansrodtang/patch-1
Updated cover tool import path.
2014-11-13 23:22:46 -08:00
Hans Rødtang 9d86e0eae4 Updated cover tool import path.
Signed-off-by: Hans Rødtang <hansrodtang@gmail.com>
2014-11-14 06:05:18 +01:00
Michael Crosby c529ab68df Merge pull request #260 from donhcd/fix_typo
Fix typo in json tag
2014-11-11 22:04:32 -08:00
Donald Huang 1aafba9f87 Fix typo in json tag
throlling_data -> throttling_data

Signed-off-by: Donald Huang <don.hcd@gmail.com>
2014-11-11 23:34:55 +00:00
Michael Crosby e48d21cf3c Merge pull request #259 from mrunalp/fix_parse_ip_rc
Fix the return code check for ParseIP.
2014-11-10 10:40:39 -08:00
Mrunal Patel 6f7adc79c8 Fix the return code check for ParseIP.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2014-11-10 13:33:29 -05:00
Michael Crosby 4ae31b6ceb Merge pull request #158 from cyphar/refactor-expose-user
Refactor and expose private functions within `libcontainer/user`.
2014-11-06 16:17:30 -08:00
Aleksa Sarai bf12e3c1f5 user: add unit tests for GetExecUser
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-11-07 11:07:21 +11:00
Aleksa Sarai 195d8d544a user: lookup: added os/user-like lookup API
This patch adds an os/user-like user lookup API, implemented in pure Go.
It also has some features not present in the standard library
implementation (such as group lookups).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-11-07 11:07:21 +11:00
Aleksa Sarai 50b68c9b4f user: *: refactor and expand libcontainer/user API
This patch refactors most of GetUserGroupSupplementaryHome and its
signature, to make using it much simpler. The private parsing ftunctions
have also been exposed (parsePasswdFile, parseGroupFile) to allow custom
data source to be used (increasing the versatility of the user/ tools).

In addition, file path wrappers around the formerly private API
functions have been added to make usage of the API for callers easier if
the files that are being parsed are on the filesystem (while the
io.Reader APIs are exposed for non-traditional usecases).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-11-07 11:07:21 +11:00
Mrunal Patel e4563c9bd3 Merge pull request #250 from zhgwenming/master
Make AddRoute() works with a provided source ip address.
2014-11-06 10:06:19 -08:00
Albert Zhang 58b336a059 Test update for routing Source Address Selection
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-11-06 15:58:07 +08:00
Michael Crosby fd6df76562 Merge pull request #62 from phemmer/docker/4442-hairpin-nat
enable hairpin mode on virtual interface bridge port
2014-11-05 17:08:35 -08:00
Mrunal Patel 20e4502777 Merge pull request #252 from crosbymichael/syncpipe
Remove syncpipe pkg
2014-11-05 16:22:23 -08:00
Michael Crosby 2be676643e Remove syncpipe pkg
This removes the entire syncpipe package and replaces it with standard
operations on the pipes.  The syncpipe type just never felt right and
probably should not have been there.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-06 00:08:10 +00:00
Michael Crosby 7c165b83b9 Merge pull request #254 from LK4D4/vet_fixes
Fix vet errors
2014-11-05 15:46:21 -08:00
Alexandr Morozov 7da5ab8130 Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-05 15:38:58 -08:00
Michael Crosby ee6f15aabc Merge pull request #255 from crosbymichael/add-drone
Add drone.yml file
2014-11-05 14:47:20 -08:00
Michael Crosby 75442b3ad2 Remove travis.yml
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-05 22:36:10 +00:00
Michael Crosby 43fb7ac975 Merge pull request #3 from tianon/drone
Fix GOPATH after Drone mucks with it
2014-11-05 14:31:11 -08:00
Tianon Gravi eb0bc72222 Fix GOPATH after Drone mucks with it
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-11-05 15:29:55 -07:00
Michael Crosby 1485c08fa8 Add drone.yml file
Update Drone commands to match the bits of the Travis config we need

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-05 22:29:41 +00:00
Albert Zhang 4291a5443d Sample configuration for ip routing Source Address Selection
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-11-05 14:35:41 +08:00
Patrick Hemmer 2d4a713602 enable hairpin mode on virtual interface bridge port
This is to support being able to DNAT/MASQ traffic from a container back into itself (dotcloud/docker#4442)

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
2014-11-03 23:11:37 -05:00
Mrunal Patel ddb4f8a12f Merge pull request #251 from unclejack/fix_go1.4_syscalls
use system.Set{u,g}id to fix Set{u,g}id on Go 1.4
2014-11-03 12:39:49 -08:00
unclejack 59584e5ba1 use system.Set{u,g}id to fix Set{u,g}id on Go 1.4
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-03 21:50:36 +02:00
Albert Zhang 7caee2a772 Use RTA_PREFSRC instead of RTA_SRC to make AddRoute() works with a provided source ip address.
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-11-01 19:47:09 +08:00
Mrunal Patel d3eb885553 Merge pull request #247 from rhatdan/selinux
Add new interfaces for label/selinux
2014-10-29 13:48:49 -07:00
Dan Walsh 50922caec2 Add new interfaces for label/selinux
We need the ability when using --ipc container:ID to match the SELinux label of the
container that the new container is sharing a label with.

Also add the ability to get the option to disable SELinux labeling for a container.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-10-29 16:39:14 -04:00
Victor Marmol e481f88267 Merge pull request #246 from rhatdan/mqueue
Mount /dev/mqueue by default
2014-10-28 16:53:29 -07:00