Commit Graph

624 Commits

Author SHA1 Message Date
f812414977 Merge pull request #6417 from mrunalp/dev/system_prctl
Add helper function to make prctl system call.
Upstream-commit: 742d8bf922976dbf6371f198e7c6ad3b55286c90
Component: engine
2014-06-16 17:13:06 -07:00
76dc816a6e Guillaume is busy full-time on his new business, and no longer available
as a maintainer.

Best of luck on your e-commerce business Guillaume, and thanks for all
the great contributions!

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 41d437117d13d445192b92a93955dec5c012512c
Component: engine
2014-06-16 06:22:15 -07:00
407e2d7995 Add helper function to make prctl system call.
Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Upstream-commit: 65567e125d9bd4d4ede25dd03bda11ebf1ef7321
Component: engine
2014-06-13 11:49:57 -07:00
99dc4301cc remove unused beam, will be back later as libchan
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 384b60b940e07d37c1ff544168a2407513114d80
Component: engine
2014-06-11 19:09:55 +00:00
52b8a282c3 Update libcontainer imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8194556337b65dda71a3d4d7f6ae9653ad5a19a0
Component: engine
2014-06-10 19:58:15 -07:00
b8d91613b1 Remove and vendor libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8a8b6d79649f666dd00f2efd60f773bb3eed898d
Component: engine
2014-06-10 19:49:57 -07:00
b00f7d0626 Gofmt imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: bae6a5a616cfc382f45a25af13633681875ddff0
Component: engine
2014-06-09 16:01:57 -07:00
3c7670e68c Move libcontainer deps into libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 6158ccad97db51e756aafefb096d1163aa4d6439
Component: engine
2014-06-09 15:52:12 -07:00
1bb9f4a354 Merge pull request #6207 from crosbymichael/nsinit-cli
Make nsinit nicer to work with libcontainer
Upstream-commit: acb9f156fdf7f992d73a70c2697b62e3eb17bfc9
Component: engine
2014-06-05 16:51:31 -07:00
e7cde49487 Merge pull request #6224 from tiborvass/storage-options
Add --storage-opt daemon option and some devicemapper option (with fixes)
Upstream-commit: 9329c0d2e08671e3d152c11595f398ff01e5fa18
Component: engine
2014-06-05 16:00:03 -07:00
124f8c9778 Merge pull request #6145 from shykes/pr_out_pkg_testutils_utility_functions_to_facilitate_writing_go_tests
pkg/testutils: utility functions to facilitate writing Go tests
Upstream-commit: 2f72fdf6eac43ebb89028308a6d5a5fac0b93ecc
Component: engine
2014-06-06 01:26:53 +03:00
19c2bab6db Update for nsenter
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f3621531579495e7de911004d47e077d421fcfb8
Component: engine
2014-06-05 14:31:16 -07:00
9760ac9e6f Update nsinit to be nicer to work with and test
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 1a3d43c23ec7bbb1aa206581acd0497c47e29a2f
Component: engine
2014-06-05 14:13:02 -07:00
82966c0798 pkg/units: Add FromHumanSize
This does the "reverse" of HumanSize, i.e. maps a string to an int64
using SI prefixes for the extension.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 13f07b636f014331a5d5dc0eac40d6ac9e5c9263
Component: engine
2014-06-05 10:02:37 +02:00
f1a3b9e98b Exclude the user namespace for setns
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 7eb508633db93213404292bd4fd21b6855f45bea
Component: engine
2014-06-04 18:03:17 -07:00
a3fd3c7cb6 Move env load to nsenter
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8497d1274b046804999699ccb66b11a3249906a1
Component: engine
2014-06-04 17:54:00 -07:00
f1f202bb40 Adding initial version of C-based nsenter for allowing execin in
libcontainer.

Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
Upstream-commit: 0a725ea28259f8a0f9a1de5730fd99675b942dde
Component: engine
2014-06-05 00:44:13 +00:00
e9b3abdfc5 Rename nsinit package to namespaces in libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8aff01c0b447fa4d68f053c44e8baf7b24247164
Component: engine
2014-06-04 15:47:57 -07:00
fac037791f Merge pull request #6198 from vishh/stats2
Add more stats to libcontainer.
Upstream-commit: fd21da4b0b91becf491d753549e9a5f7158aebbd
Component: engine
2014-06-04 15:28:19 -07:00
d17e332286 Add stats for memory allocation failure count and instantaneous cpu usage in the usermode and kernelmode.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 8d63b610c39eb34b06f275b507c482460015531e
Component: engine
2014-06-04 21:20:21 +00:00
cda4353dab implement wait on freeze
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: dc21dd2634791d272b8e39493815bb81eaba5605
Component: engine
2014-06-04 02:21:10 +00:00
b048abf5ab Merge pull request #6183 from crosbymichael/fix-freezer-fs
Don't rejoin the freezer cgroup each time
Upstream-commit: 2c27e6e9abb01d5a1c8c5d1c16aef6daf82b6b99
Component: engine
2014-06-03 16:16:58 -07:00
525251ebaa Merge pull request #6180 from unclejack/apparmor
apparmor: write & load the profile on every start
Upstream-commit: 37d69aae5e2aaf914629d9f416fd59c34deb94ab
Component: engine
2014-06-03 15:56:28 -07:00
44f1195c6c Don't rejoin the cgroup each time
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 534521301c81bcc536446351cf4018f02d477d2a
Component: engine
2014-06-03 15:24:30 -07:00
7d5cb46a54 apparmor: write & load the profile on every start
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 1ef3ca83d8624aaaaed05cfce1f71282d70d84dd
Component: engine
2014-06-04 00:56:35 +03:00
f20c102828 Implement systemd support for freezer
These PR does a few things.  It ensures that the freezer cgroup is
joined in the systemd driver.  It also provides a public api for setting
the freezer state via the cgroups package.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 613f74c1fbbdc5e476d28974d1dbe3727033d083
Component: engine
2014-06-03 10:46:53 -07:00
006edb2caf libcontainer/cgroup: Use raw access to set up and join the devices cgroup
The systemd support for the devices cgroup lacks two required features:
 * Support for wildcards to allow mknod on any device
 * Support for wildcards to allow /dev/pts support

The second is available in more recent systemd as "char-pts", but not in e.g. v208 which is in wide use.

Additionally, the current approach of letting systemd set up the devices cgroup and then adding
some devices to it doesn't work, because some times systemd (at least v208) re-initializes
the devices cgroup, overwriting our custom devices. See https://github.com/dotcloud/docker/issues/6009
for the details.

When wildcarded mknod support is available in systemd we should implement a pure systemd version,
but we need to keep the old one around for backwards compat.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 6b8f0e394b3960bba1db982c62c002221419f3f5
Component: engine
2014-06-03 11:34:14 +02:00
3e5c143450 Merge pull request #6153 from vishh/stats1
Add per cpu usage to libcontainer  stats 
Upstream-commit: 70b778751e72d9f616b80a41dd35fdfe1c5ba032
Component: engine
2014-06-02 17:53:17 -07:00
26c494ff41 Merge pull request #6160 from crosbymichael/update-test-for-nil-error
Update cpu stat test for no error
Upstream-commit: c136384b20970af7b73d16f912fae9b5bffa6b2c
Component: engine
2014-06-02 12:12:49 -07:00
c760899ade Merge pull request #6147 from cyphar/6142-mflag-strip-quotes-long-equal-form
mflag: strip quotes in certain forms from flag values
Upstream-commit: 24ea088124f00896eefc166da1b9e2fad4a03273
Component: engine
2014-06-02 12:03:58 -07:00
2e677833d3 Update cpu stat test for no error
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 30fdac2cb1bd5461972cef6efa3d67270db23491
Component: engine
2014-06-02 11:54:23 -07:00
d8a617a361 Fix format in maintainers files
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 0a06e9bd91faff2c129fd5a7b30b85351c96601f
Component: engine
2014-06-02 07:05:06 +00:00
c0015f4cf4 Add Cristian as maintainer to pkg/testutils
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 1a93d3b054751f6783064e5adb91f196687400b2
Component: engine
2014-06-02 07:01:17 +00:00
656618108c Adding percpu usage to cgroup stats reported by libcontainer.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 3723d6341effa7698ccbb05ab708b0c25ee1af02
Component: engine
2014-06-02 06:56:15 +00:00
8148195e5a Adding "stats" and "spec" option to nsinit binary which will print the stats and spec respectively.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: f7b82be0dd1dc0d9b0fa6c9c194dc2c90af3d133
Component: engine
2014-06-02 06:37:22 +00:00
af5c1612d8 pkg: mflag: flag: added tests for quote-stripped flags
This patch adds some tests to ensure that quoted flags are properly
handled by the mflag package.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Upstream-commit: e4497feaba31dd33bad790f77f783afc0c695020
Component: engine
2014-06-02 15:25:38 +10:00
460cf60260 pkg: mflag: flag: make mflag strip quotes in -flag="var" forms
This patch improves the mflag package to ensure that things arguments
to mflag such as `-flag="var"` or `-flag='var'` have the quotes
stripped from the value (to mirror the getopt functionality for similar
flags).

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Upstream-commit: 0e9c40eb8243fa437bc6c3e93aaff64a10cb856e
Component: engine
2014-06-02 15:25:33 +10:00
0311fdd2c0 pkg/testutils: utility functions to facilitate writing Go tests
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: ca231b3de52f718d96c0ff6e7af40c7c0fade623
Component: engine
2014-06-01 23:23:31 +00:00
bd709c495b Merge pull request #6128 from crosbymichael/empty-sqlite
Init database if empty file
Upstream-commit: 05cf3498a69c271345313ccd38b2de2ae325406f
Component: engine
2014-05-31 06:56:00 +03:00
3248c6e81c Ensure all dev nodes are copied for privileged
This also makes sure that devices are pointers to avoid copies
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 69989b7c06b0ca6737e83ddf8fcfa2dfccc57a7c
Component: engine
2014-05-30 18:39:11 -07:00
d5186289b5 Init database if empty file
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: b0ea389c694484c0e4907e12a9cf8ff10f80c164
Component: engine
2014-05-30 17:44:00 -07:00
bc9024a72e Merge pull request #6097 from timthelion/consistentdevices
Refactor device handling code
Upstream-commit: 0ef637722f69cff931b25c75d421e231ab75af75
Component: engine
2014-05-31 03:34:52 +03:00
54c61632f8 use stderr to debug iptables
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 5708aa62f36eadca5ada235ca05fddeb1510c1c6
Component: engine
2014-05-30 19:39:42 +00:00
52c8a31f21 Refactor device handling code
We now have one place that keeps track of (most) devices that are allowed and created within the container.  That place is pkg/libcontainer/devices/devices.go

This fixes several inconsistencies between which devices were created in the lxc backend and the native backend.  It also fixes inconsistencies between wich devices were created and which were allowed.  For example, /dev/full was being created but it was not allowed within the cgroup.  It also declares the file modes and permissions of the default devices, rather than copying them from the host.  This is in line with docker's philosphy of not being host dependent.

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
Upstream-commit: 608702b98064a4dfd70b5ff0bd6fb45d2429f45b
Component: engine
2014-05-30 19:21:29 +00:00
95b0c9bbd6 Atomically increment sequence in pkg/netlink
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: adb639117b5c61479d65dbf8398c0fbeda1d6cad
Component: engine
2014-05-30 16:08:29 +04:00
c82b5a7f36 Added a new method cgroups.GetStats() which will return a cgroups.Stats object which will contain all the available cgroup Stats.
Remove old Stats interface in libcontainers cgroups package.
Changed Stats to use unit64 instead of int64 to prevent integer overflow issues.
Updated unit tests.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 72e6e5ff7edc9c054e154897a4c547d89c082293
Component: engine
2014-05-29 20:16:49 +00:00
35a8824c9b Merge pull request #6105 from gdm85/master
Do not consider iptables' output an error in case of xtables lock
Upstream-commit: 189c600b3ba36934c074eb6769e23989ef22fda7
Component: engine
2014-05-29 11:06:25 -07:00
ee4e3699c5 * do not consider iptables' output an error in case of xtables lock
Docker-DCO-1.1-Signed-off-by: Giuseppe Mazzotta <gdm85@users.noreply.github.com> (github: gdm85)
Upstream-commit: 5e3b643ce6f43d02fc7fe88eba41d583044a2efd
Component: engine
2014-05-29 15:57:29 +02:00
a8abe1db1c Handle EBUSY on remount
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 5d04b9deafc5ce173364a24881f8e950c9430be0
Component: engine
2014-05-28 18:10:50 -07:00
d45f77737e Merge pull request #6083 from bernerdschaefer/nsinit-drop-capabilities-after-changing-user
SETUID/SETGID not required for changing user
Upstream-commit: b204b97c9adbaddd5b8cef3dc53cbee2a392b936
Component: engine
2014-05-28 17:29:17 -07:00