John Howard
10e2dbf375
Windows: Factor out LXC
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-04-30 14:28:35 -07:00
Ma Shimiao
73bf9b5c19
add err check before getting term
...
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-04-16 17:46:32 +08:00
Antonio Murdaca
c30a55f14d
Refactor utils/utils, fixes #11923
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Antonio Murdaca
6f4d847046
Replace aliased imports of logrus, fixes #11762
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
Jessica Frazelle
7dce902494
Get rid of panic in stats for lxc
...
Fix containers dir
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-03-24 21:12:06 -07:00
Jessie Frazelle
22dba32b4d
Merge pull request #10527 from mfojtik/lxc_11
...
Fix lxc-start in lxc>1.1.0 where containers start daemonized by default
2015-03-24 17:37:27 -07:00
Michael Crosby
246cab90f2
Mkdir for lxc root dir before setup of symlink
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-24 15:53:23 -07:00
Michal Fojtik
d62f25e422
Fix lxc-start in lxc>1.1.0 where containers start daemonized by default
...
Signed-off-by: Michal Fojtik <mfojtik@redhat.com>
2015-03-19 14:51:05 +01:00
Michael Crosby
0c2eb5ebfb
Merge pull request #11295 from LK4D4/oom_after_dead
...
Check oom status after container stopped in lxc driver
2015-03-16 14:16:47 -07:00
Qiang Huang
bffe04b582
fix warning messages
...
Use log.Warnf instead of log.Infof, and remove redundant `WARNING` prefix.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-11 08:47:45 +08:00
Alexander Morozov
d59212e605
Check oom status after container stopped in lxc driver
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 13:45:13 -07:00
Alexander Morozov
821ec8334f
Setup user groups in lxc driver
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-10 09:43:11 -07:00
Alexander Morozov
68ba5f0b69
Execdriver implementation on new libcontainer API
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-06 14:46:58 -08:00
Abin Shahab
3bd3f7854a
Restored removed docker init options
...
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-02-24 16:59:04 +00:00
Abin Shahab
1a26ed09ee
Implements stats for lxc driver
...
Implements stats and fixes stats test.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-02-23 10:16:52 +00:00
Abin Shahab
3ca5af6b1a
Adds ipc namespace capability to lxc, and fixes tests.
...
This fixes various tests by checking for non zero exit code, accounting for lxc-specific base-diffs, and by removing lxc specific environment vars.
It also adds the --share-ipc option to lxc-start for shared ipc namespaces.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-01-21 06:08:00 +00:00
Michael Crosby
4f174aa792
Evict stopped containers
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Michael Crosby
65f58e2a74
Implement container stats collection in daemon
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Alexander Morozov
e7d086c2be
Fix vet errors about unkeyed fields
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-12 10:44:59 -08:00
Abin Shahab
fdf7457683
LXC CAP ADD CAP DROP IN TEMPLATE
...
Added cap-drop and cap-add in lxc template
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2014-12-05 23:08:22 +00:00
Michael Crosby
5c863f983d
Merge pull request #9107 from ashahab-altiscale/9062-linked-container
...
Share network namespace of containers with lxc
2014-11-13 18:25:38 -08:00
Abin Shahab
adb07b53e0
LINKED CONTAINER ID PASSED TO LXC
...
This passed the --net=container:CONTINER_ID to lxc-start as --share-net
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2014-11-11 09:10:15 +00:00
Vishnu Kannan
46f2944977
Address comments.
...
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-11-08 00:14:08 +00:00
Vishnu Kannan
f96e04ffc7
This patch adds ability in docker to detect out of memory conditions in containers.
...
Since the containers can handle the out of memory kernel kills gracefully, docker
will only provide out of memory information as an additional metadata as part of
container status.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-11-08 00:14:08 +00:00
Alexandr Morozov
ee7dd44c01
Mass gofmt
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:11:48 -07:00
Alexandr Morozov
7c62cee51e
Use logrus everywhere for logging
...
Fixed #8761
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Michael Crosby
32dca1a7b0
Strongly type exec driver context
...
This also removes dead code in the native driver for a past feature that
was never fully implemented.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-09-29 22:40:26 +00:00
Victor Vieux
0913009ebe
Merge pull request #8191 from vieux/improve_error_exec_lxc
...
Improve error for docker exec & LXC
2014-09-25 15:58:21 -07:00
Victor Vieux
ab30e19b96
Improve error for docker exec & LXC
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-09-23 21:47:33 +00:00
Alexandr Morozov
623ebf203b
Persistent directory for container in execdriver
...
This is needed for persistent namespaces
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-22 22:48:26 +04:00
Vishnu Kannan
f3c767d798
Adding Exec method to native execdriver.
...
Modified Attach() method to support docker exec.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-09-15 16:57:52 +00:00
Vishnu Kannan
3a7e07355a
Rename 'StdConfig' to 'StreamConfig'.
...
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-09-01 14:31:01 -07:00
Vishnu Kannan
4aa5da278f
Refactoring execdriver.Command and Container structs to support 'docker exec' and other
...
similar features in the future.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-09-01 14:30:16 -07:00
Josiah Kiehl
a02f67be5b
Extract log utils into pkg/log
...
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
2014-08-13 15:18:15 -07:00
Alexandr Morozov
391c35c822
Fix go vet warnings
...
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-13 11:37:30 +04:00
Michael Crosby
7321067176
Use argv0 as reexec implementation for dockerinit
...
This changes the way the exec drivers work by not specifing a -driver
flag on reexec. For each of the exec drivers they register their own
functions that will be matched aginst the argv 0 on exec and called if
they match.
This also allows any functionality to be added to docker so that the
binary can be reexec'd and any type of function can be called. I moved
the flag parsing on docker exec to the specific initializers so that the
implementations do not bleed into one another. This also allows for
more flexability within reexec initializers to specify their own flags
and options.
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-11 11:47:21 -07:00
Victor Vieux
ac3eecf3db
Merge pull request #7062 from crosbymichael/fix-lxc-caps
...
Fix cap drop issues with lxc
2014-07-28 16:19:08 -07:00
Victor Vieux
5a0ef08c94
gofmt -s -w
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:25:29 +00:00
Victor Vieux
b3ee9ac74e
update go import path and libcontainer
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Michael Crosby
0d67b420b5
Make tty term exec driver specific
...
lxc is special in that we cannot create the master outside of the
container without opening the slave because we have nothing to provide to the
cmd. We have to open both then do the crazy setup on command right now instead of
passing the console path to lxc and telling it to open up that console. we save a couple of
openfiles in the native driver because we can do this.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-16 16:57:49 -07:00
Victor Vieux
6d238c6fba
Merge pull request #6797 from zhgwenming/master
...
make /.dockerinit bind mount driver specific
2014-07-16 16:01:43 -07:00
Michael Crosby
50b580cfec
Use : to split caps in sysinit flags
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-16 13:40:10 -07:00
Michael Crosby
47917135da
Fix cap drop issues with lxc
...
This uses "," instead of spaces so that the flags are parsed correctly
and also does not do a strings.Split on an empty string because
strings.Split will return a slice with one element, and empty string
causing parsing to fail when it validates that the cap exists.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-16 12:14:26 -07:00
Victor Vieux
21059af3ac
Basic --cap-add and --cap-drop support for lxc
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 23:43:21 +00:00
Michael Crosby
707ef9618b
Update close fd issues for lxc
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-19 16:02:21 -04:00
Michael Crosby
d31ae5aed8
Use libcontainer cap drop method
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-19 16:00:53 -04:00
Dinesh Subhraveti
cf331cdd6a
Maintain a whitelist of capabilities rather than droplist
...
This fixes 6/18 vulnerability
Docker-DCO-1.1-Signed-off-by: Dinesh Subhraveti <dineshs@altiscale.com> (github: dineshs-altiscale)
2014-06-19 03:34:04 -04:00
Michael Crosby
8194556337
Update libcontainer imports
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-06-10 19:58:15 -07:00
Michael Crosby
bae6a5a616
Gofmt imports
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-06-09 16:01:57 -07:00
Michael Crosby
6158ccad97
Move libcontainer deps into libcontainer
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-06-09 15:52:12 -07:00