Commit Graph

751 Commits

Author SHA1 Message Date
Rohit Jnagal 51aa43f44c Merge pull request #282 from crosbymichael/spec
Add container spec
2014-12-02 00:03:08 -08:00
Michael Crosby c511f7cfed Add container spec
This document specifies the current container specification with all the
underlying setup and configuration that goes into making a container.
This is the v1 spec that is today but allows for flexability when we
introduce more features such as seccomp default profiles and more.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-12-01 16:42:01 -05:00
Michael Crosby 7ce34f58cb Merge pull request #280 from cpuguy83/add_rlimit_support
Add support for setting rlimit for contianer
2014-11-26 11:14:49 -08:00
Brian Goff e6cc8fc713 Add support for setting rlimit for contianer
Adds a new item to the config struct []*Rlimit
Rlimit takes a type (ie, syscall.RLIMIT_NOFILE) and the hard/soft limit
(As max/cur)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-11-26 14:10:01 -05:00
Mrunal Patel 72942137ef Merge pull request #277 from yoheiueda/support-for-ppc64-ppc64le-s390x
Add support for ppc64, ppc64le, s390x
2014-11-24 12:40:28 -08:00
Yohei Ueda 3bd18c2c54 Add support for ppc64, ppc64le, s390x
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-21 14:18:48 +00:00
Mrunal Patel 0aa8280708 Merge pull request #276 from unclejack/add_txq
netlink: add NetworkSetTxQueueLen to set qlen
2014-11-20 20:08:55 -08:00
Michael Crosby a943fbabec Merge pull request #275 from rhatdan/selinux
Add call to label to allow it to tell kernel how to label created files
2014-11-20 15:32:25 -08:00
unclejack 209b1c1f99 netlink: add NetworkSetTxQueueLen to set qlen
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2014-11-21 01:24:15 +02:00
Dan Walsh dd89eb9eca Add call to label to allow it to tell kernel how to label created files
SELinux supports a call that tells the kernel, from this point onward
create content with this label.  If you pass "", the kernel will
go back to the default.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-11-20 17:39:39 -05: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