Commit Graph

835 Commits

Author SHA1 Message Date
Daniel, Dao Quang Minh d6cd7ce43f define PR_SET_CHILD_SUBREAPER if not set
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-17 10:16:57 -05:00
Michael Crosby 2329014b6d Implement types for namespaces
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-12-16 16:34:46 -08:00
Michael Crosby 4661c239dc Add type for namespaces for better UI
This adds `type Namespaces []Namespace` so that methods can be added to
this slice so that it is easier for consumers to work with the values.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-12-16 16:15:35 -08:00
Victor Marmol ef1c1c4289 Merge pull request #301 from cyphar/user-fix-names
user: fix function signatures
2014-12-17 00:25:46 +08:00
Aleksa Sarai 8a8eb57746 *: merge to new user/ API
This patch switches libcontainer's usage of the user/ API to the new
version.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-12-17 02:00:21 +11:00
Aleksa Sarai b322073f27 user: *: fix function signatures
This patch changes the incorrectly named functions GetPasswdFile,
GetGroupFile, GetExecUserFile and several internal components to
GetPasswdPath, GetGroupPath, etc -- as these are far more appropriate
names and more clearly convey to users what the arguments represent.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-12-17 02:00:16 +11:00
Daniel, Dao Quang Minh 43842efecc reformat with indent -linux
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-15 14:39:55 -05:00
Mrunal Patel 42fed751fb Merge pull request #297 from optiflows/delete_interface_ip
Adding a function that allows to remove an address set on an interface
2014-12-14 22:18:22 -08:00
Rohit Jnagal 4940cee052 Merge pull request #290 from dqminh/exec-spec
add spec for exec a new process inside a container
2014-12-12 09:20:35 -08:00
Gary Berger 1d7207079f Rename of libcontainer image on Docker Hub
Signed-off-by: Gary Berger <gary@firstclassfunc.com>
2014-12-12 09:18:30 -05:00
Ketouem c3ab8d0cb4 Adding a function that allows to remove an address set on an interface
Signed-off-by: Cyril Thomas <ketouem@gmail.com>
2014-12-12 12:21:24 +01:00
Michael Crosby f925aa3503 Merge pull request #294 from cyphar/user-add-cyphar-maintainer
user: MAINTAINERS: add cyphar (myself) as a maintainer
2014-12-11 19:02:08 -08:00
Michael Crosby 5fedffd8fd Merge pull request #295 from hqhq/hq_fix_memory_test
cgroups: add failcnt test
2014-12-11 16:37:05 -08:00
Qiang Huang 2aebf7d849 cgroups: add failcnt test
It was missed in the first place.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2014-12-11 16:27:06 -08:00
Mrunal Patel dc827aa0ee Merge pull request #289 from dqminh/execin-rlimit
Set rlimit for execin process
2014-12-11 14:22:41 -08:00
Daniel, Dao Quang Minh eb2ae34c80 move cgroup requirements to planned additions
also document that the executor will only try to remove all the children in a
best-effort way.

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-11 13:59:10 -05:00
Mrunal Patel e8f5b54301 Merge pull request #288 from hqhq/hq_add_memory_swap
cgroup: add support to set MemorySwap
2014-12-11 10:45:34 -08:00
Daniel, Dao Quang Minh e9c1b0144a fix some grammar errors
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-11 13:45:07 -05:00
Aleksa Sarai 6516e6ce8c user: MAINTAINERS: add cyphar as a maintainer
This patch adds Aleksa Sarai to the maintainer list for libcontainer's
user API.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-12-12 05:11:18 +11:00
Qiang Huang 9184d9473d cgroup: add support to set MemorySwap
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2014-12-11 09:40:55 -08:00
Daniel, Dao Quang Minh 19099e065d add spec for exec a new process inside a container
document desired execin process behavior for v1 container specification

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-11 03:22:20 -05:00
Michael Crosby 0d0402712b Merge pull request #287 from dqminh/execin-test
add support for testing execin
2014-12-10 10:12:46 -08:00
Daniel, Dao Quang Minh 6a76ecb1ce refactor common container setup out of execin tests
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-10 04:18:43 -05:00
Daniel, Dao Quang Minh 0195469398 execin should honour rlimit of the container
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-10 04:13:31 -05:00
Daniel, Dao Quang Minh 2f1b2ce204 add support for testing execin
when the test binary starts, it detects whether it should run the container
initialization code or the execin initialization code based on the suppplied
arguments. The execin initialization code is taken from docker.

also added a sample test for execin process.

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-10 03:39:00 -05:00
Victor Marmol 58fc93160e Merge pull request #285 from hqhq/hq_add_cpuset_mems
cgroups: add support for cpuset.mems
2014-12-06 09:44:13 +08:00
Qiang Huang e3b14402eb cgroups: add support for cpuset.mems
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2014-12-05 17:37:24 -08:00
Mrunal Patel 6ffd59a784 Merge pull request #279 from crosbymichael/namespaces-join
Change namespaces config to include path for setns
2014-12-04 11:19:48 -08:00
Michael Crosby 12124f731d Remove unused namespace types
This removes the unsued namespace types from the namespace package
and simplifies getting the values for the namespaces.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-12-03 15:47:26 -08:00
Michael Crosby 549f508d5b Change namespaces config to include path for setns
This changes the namespace configuration on the config to include the
name of the namespace along with an optional path.  This path is used to
point to a file of another namespace for the namespace so that it can be
joined in place of the empty, initialized namespace.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-12-03 12:00:43 -08:00
Mrunal Patel 53eca435e6 Merge pull request #273 from vishh/prctl
Set child sub reaper option on nsenter
2014-12-02 15:28:38 -08:00
Michael Crosby b02b0b037b Merge pull request #278 from milosgajdos83/macvtap
Introducing macvtap device to netlink package
2014-12-02 15:16:51 -08:00
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
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
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
Vishnu Kannan 4c6df516ae Set child sub reaper option on nsenter to help cleanup all processes orphaned via ExecIn.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-11-19 20:14:20 +00: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