Commit Graph

732 Commits

Author SHA1 Message Date
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
Michael Crosby 1485c08fa8 Add drone.yml file
Update Drone commands to match the bits of the Travis config we need

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-05 22:29:41 +00:00
Albert Zhang 4291a5443d Sample configuration for ip routing Source Address Selection
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-11-05 14:35:41 +08:00
Patrick Hemmer 2d4a713602 enable hairpin mode on virtual interface bridge port
This is to support being able to DNAT/MASQ traffic from a container back into itself (dotcloud/docker#4442)

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
2014-11-03 23:11:37 -05:00
Mrunal Patel ddb4f8a12f Merge pull request #251 from unclejack/fix_go1.4_syscalls
use system.Set{u,g}id to fix Set{u,g}id on Go 1.4
2014-11-03 12:39:49 -08:00
unclejack 59584e5ba1 use system.Set{u,g}id to fix Set{u,g}id on Go 1.4
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-03 21:50:36 +02:00
Albert Zhang 7caee2a772 Use RTA_PREFSRC instead of RTA_SRC to make AddRoute() works with a provided source ip address.
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-11-01 19:47:09 +08:00
Mrunal Patel d3eb885553 Merge pull request #247 from rhatdan/selinux
Add new interfaces for label/selinux
2014-10-29 13:48:49 -07:00
Dan Walsh 50922caec2 Add new interfaces for label/selinux
We need the ability when using --ipc container:ID to match the SELinux label of the
container that the new container is sharing a label with.

Also add the ability to get the option to disable SELinux labeling for a container.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-10-29 16:39:14 -04:00
Victor Marmol e481f88267 Merge pull request #246 from rhatdan/mqueue
Mount /dev/mqueue by default
2014-10-28 16:53:29 -07:00
Dan Walsh 4c53074e23 Mount /dev/mqueue by default
Need this for supporting Posix Message Queues

man mq_overview

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-10-28 19:35:35 -04:00
Michael Crosby f60d7b9195 Merge pull request #245 from crosbymichael/share-ipc
Allow IPC namespace to be shared between containers or with the host
2014-10-28 15:17:07 -07:00
Michael Crosby ad9b433e6c Add test for ipc private and shared path
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-28 22:13:05 +00:00
Michael Crosby 85f3df2539 Add test for IPC host sharing
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-28 22:00:28 +00:00
Michael Crosby efd5f0a7e1 Merge branch 'unreserve' of https://github.com/rhatdan/libcontainer into rhatdan-unreserve 2014-10-28 21:44:55 +00:00
Michael Crosby fe3801ccd2 Merge pull request #244 from vmarmol/net-stats
Only fetch network stats we use.
2014-10-27 21:12:11 -07:00
Michael Crosby c9d5aaa5d5 Merge pull request #243 from ashahab-altiscale/242-additional-blkio-stats
ADDITIONAL CGROUPS BLKIO STATS
2014-10-27 17:18:00 -07:00
Victor Marmol 26bda36e5d Only fetch network stats we use.
The dynamic version using WalkPath() was expensive and we only used some
of the stats anyways.

Signed-off-by: Victor Marmol <vmarmol@google.com>
2014-10-27 17:09:36 -07:00
Mrunal Patel cda71a5a61 Merge pull request #238 from lucafavatella/contributing
Fix link re contributing in README
2014-10-26 13:34:44 -07:00
Luca Favatella 9c659a36a5 Fix link re contributing in README following renaming in 9b10e7f 2014-10-25 13:19:21 +01:00