Mrunal Patel
1597c68f7b
Merge pull request #312 from LK4D4/care_#302
...
Add type for namespaces for better UI (replacement of #302 )
2014-12-23 11:27:51 -08:00
Alexander Morozov
5bb8146989
Add Contains wrapper for Namespaces type
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-23 11:13:45 -08:00
Mrunal Patel
6423c8d261
Merge pull request #307 from LK4D4/systemd_notify_oom
...
OOM Notify refactoring
2014-12-23 09:15:50 -08:00
Andrey Vagin
13841ef37d
new-api: return the Running state only if the init process is alive
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-23 16:30:37 +03:00
Andrey Vagin
1a380ac436
nsinit: remove ticks around nsenter
...
If we really need these command, we need to expand API.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-23 16:30:37 +03:00
Rohit Jnagal
9455a8ce3a
Merge pull request #310 from jfrazelle/9771-non-local-mac-address
...
Allow non local mac-address.
2014-12-22 23:03:42 -08:00
Jessica Frazelle
312f997de6
Allow non local mac-address.
...
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-12-22 22:42:49 -08:00
Rohit Jnagal
f61899ece3
Merge pull request #308 from LK4D4/fix_cgroups_removing
...
Fix removing of cgroups if something still alive in container
2014-12-22 17:45:41 -08:00
Alexander Morozov
6feb7bda04
Fix removing of cgroups if something still alive in container
...
Now we try to remove cgroups 5 times with increased delay between
tries.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-22 14:34:58 -08:00
Alexander Morozov
9825a26db5
Refactor NotifyOnOOM a little
...
Now there is function NotifyOnOOM in libcontainer package, which
receives *libcontainer.State as argument.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-22 11:44:41 -08:00
Mrunal Patel
08fdb50b03
Merge pull request #300 from dqminh/subreaper
...
define PR_SET_CHILD_SUBREAPER if not set
2014-12-19 10:44:23 -08:00
Michael Crosby
187792e35b
Merge pull request #293 from gaberger/292-makefilechange
...
Changed docker hub pointer to dockercore
2014-12-19 09:46:39 -08:00
Victor Marmol
e1b4ec3363
Merge pull request #306 from avagin/api-linux-2
...
Use namespace.Exec() and namespace.Init() to execute processes in CT
2014-12-19 07:44:16 -08:00
Andrey Vagin
c912207636
namespaces: combine Process.Env and Container.Env
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 14:48:16 +03:00
Andrey Vagin
86653c66a3
libcontinaer: use new API in integration tests
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 14:48:16 +03:00
Andrey Vagin
540f44d3b2
process: use io.Reader instead of io.WriteCloser for standard fds
...
Could someone explain why we should close this fds? Usually users
cares about closing them or not.
For example exec.Cmd declares them as io.Reader.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 14:48:16 +03:00
Andrey Vagin
7996829914
libcontainer: optimize updateStateFile()
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 14:48:15 +03:00
Andrey Vagin
5ecd29c1f2
linux_container: fork an init process in a new set of namespaces
...
Use namespace.Exec() and namespace.Init() to execute processes in CT.
Now an init process is actually executed in a new container. This series
doesn't change code about creating containers, it only reworks code according
with new API.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 14:47:04 +03:00
Andrey Vagin
c406a6b6e0
nsinit: clean up
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 12:32:34 +03:00
Andrey Vagin
ce9d63376f
libcontainer: move State in the configs package
...
We are going to import the namespaces package into libcontainer,
so libcontainer should not be imported into namespaces.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 12:32:34 +03:00
Andrey Vagin
7038ddbc8c
libcontainer: move Config in a separate package
...
We are going to import the namespaces package into libcontainer,
so libcontainer should not be imported into namespaces.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-19 12:32:34 +03:00
Victor Marmol
c44e63a62d
Merge pull request #299 from avagin/api-linux
...
Prepare ground for moving on new API
2014-12-18 09:22:17 -08:00
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
Andrey Vagin
44024d0c47
Makefile: get the glog package
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2014-12-17 07:39:18 +03:00
Andrey Vagin
8e9a6d28d2
linux_container: execute an init process in a new CT
...
Here is a first step to implement a new API. Currently the init
processes is executed without namespaces and cgroups.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2014-12-17 07:39:18 +03: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
Andrey Vagin
2441babc48
linux_factory: add StartInitialization()
...
After forking a new processes in a new container, we need to call exec()
and tune namespaces.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2014-12-16 09:19:16 +03:00
Andrey Vagin
bce773a8c4
linux_container: ct.Destroy() returns error if CT isn't stopped
...
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2014-12-16 09:19:12 +03:00
Andrey Vagin
159db89c1f
nsinit: use the new API for executing processes
...
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2014-12-16 09:19:02 +03:00
Andrey Vagin
b608f5df10
nsinit: Add Makefile
...
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2014-12-16 09:18:48 +03: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