Commit Graph

564 Commits

Author SHA1 Message Date
Victor Marmol 7dc9dc3473 Merge pull request #58 from maebashi/fix-setns-order
fix the order of setns()
2014-07-29 09:45:13 -07:00
Victor Marmol 7cdbf095e0 Merge pull request #133 from soundcloud/non-linux-clock-ticks
Implement system.GetClockTicks for all platforms
2014-07-29 09:21:58 -07:00
Victor Marmol 5e2627e687 Merge pull request #130 from vishh/fix_cgroup_path
Make fs.GetStats() work when used from inside a docker container.
2014-07-29 09:21:46 -07:00
Bernerd Schaefer eafabef56d Implement system.GetClockTicks for all platforms
Docker-DCO-1.1-Signed-off-by: Bernerd Schaefer <bj.schaefer@gmail.com> (github: bernerdschaefer)
2014-07-29 14:37:47 +02:00
Vishnu Kannan 66aee74b1e Libcontainer fs.GetStats() will not look for cgroups relative to the cgroup of init process if the parent
in cgroups.Cgroup is absolute. This is required to get stats of other containers while running inside a docker container.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-29 05:08:04 +00:00
Victor Marmol e64f9a39c6 Merge pull request #105 from rhatdan/master
Add label.InitLabels functioni. Allows generation of labels based on options
2014-07-28 14:32:51 -07:00
Dan Walsh bc3c671e21 Add label.InitLabels functioni. Allows generation of labels based on options
This will allow us to do the following with docker.

Customize the way that a labeling system like SELinux will run on a container.

    --label-opt="user:USER"  : Set the label user for the container
    --label-opt="role:ROLE"  : Set the label role for the container
    --label-opt="type:TYPE"  : Set the label type for the container
    --label-opt="level:LEVEL"  : Set the label level for the container
    --label-opt="disabled"  : Turn off label confinement for the container

Since we are passing a list of string options instead of a space separated
string of options, I will change function calls to use InitLabels instead of
GenLabels.  Genlabels interface is Deprecated.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-07-28 16:09:17 -04:00
maebashi f333c5ce9b remove unnecessary headers
Docker-DCO-1.1-Signed-off-by: Takahiro Maebashi <maebashi@iij.ad.jp> (github: maebashi)
2014-07-28 11:02:35 +09:00
Aleksa Sarai 01a7f19afe namespaces: nsenter: ignore nonexistent namespaces
If a particular kernel doesn't have namespace directories that
libcontainer tries to attain during nsenter(), ignore the error (this is
consistent with the previous implementation of nsenter()).

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-07-28 11:02:17 +09:00
Victor Marmol e6a43c1c2b Merge pull request #128 from crosbymichael/fix-nsenter
Correct nsenter fprintf syntax
2014-07-24 15:09:25 -07:00
Victor Marmol 76f193085a Merge pull request #127 from crosbymichael/update-docker-imports
Update imports for new docker location
2014-07-24 14:56:10 -07:00
Michael Crosby 52e7350c9d Correct nsenter fprintf syntax
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-24 14:54:05 -07:00
Michael Crosby 4568ca76c8 Update imports for new docker location
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-24 14:28:49 -07:00
Michael Crosby 010e87b261 Merge pull request #123 from tianon/dockerfile-tweaks
Add a couple tweaks to the Dockerfile
2014-07-24 09:48:55 -07:00
Victor Marmol f348ac401f Merge pull request #121 from vishh/fix_network_stats
Fix veth network stats.
2014-07-24 09:13:39 -07:00
Victor Marmol 081a08e8a6 Merge pull request #126 from dhammika/125-null-term-ifr_name
Null-term ioctl ifr_name strings #125
2014-07-24 09:13:17 -07:00
Vishnu Kannan 47096e1ffd Fix veth network stats. Tx on the host vETH is ingress traffic and not egress.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-24 05:50:44 +00:00
Dhammika Pathirana c391368000 Null-term ioctl ifr_name strings
Docker-DCO-1.1-Signed-off-by: Dhammika Pathirana <dhammika@gmail.com> (github: dhammika)
2014-07-23 22:26:58 -07:00
Tianon Gravi 356f7a9136 Add a couple tweaks to the Dockerfile
- we don't need to add a "daemon" user to busybox; it already has one :)
- if we split out the "go get" from the "go install", we can have nice clean output on "docker build" of which dependencies we're pulling in and all the packages that get built :)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-23 19:07:07 -06:00
Victor Marmol 6777537b30 Merge pull request #122 from tianon/makefile-rm
Add missing "--rm" on "make sh"
2014-07-23 18:03:12 -07:00
Tianon Gravi f8e987f731 Add missing "--rm" on "make sh"
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-23 18:58:16 -06:00
Victor Marmol 052947809d Merge pull request #120 from crosbymichael/add-tests1
Add busybox rootfs so we can run containers
2014-07-23 17:31:51 -07:00
Michael Crosby a0bee99d41 Add busybox rootfs so we can run containers
make sh will spawn a new container using the minimal.json file inside
busybox and you don't even know what is going on.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 17:14:27 -07:00
Victor Marmol 7d3cd408c4 Merge pull request #119 from vishh/fix_network_stats
Minor fixes to network stats
2014-07-23 15:15:01 -07:00
Vishnu Kannan 469957ccd7 Do not mark any network stats as 'omitempty' since the value '0' is legal for those stats.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-23 22:12:23 +00:00
Vishnu Kannan 2a81a149da Make NetworkStats a pointer to help the callers ignore that stats if it cannot be returned for any reason.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-23 21:18:58 +00:00
Michael Crosby 5d39cecc5f Merge pull request #117 from crosbymichael/add-integration-tests
Add integration tests with nice makefile
2014-07-23 13:56:27 -07:00
Michael Crosby feb1d28456 Use short flag for identifying integration tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 13:45:05 -07:00
Michael Crosby 00047d5339 Update travis to test specific packages
Add another netlink test and remove the -v from the dockerfile test
output
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 11:34:07 -07:00
Michael Crosby 39ce7cca29 Add code coverage to the tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 10:58:45 -07:00
Michael Crosby 4404b1521c Add start of netlink unit tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 10:41:10 -07:00
Michael Crosby 200f7191d7 Add makefile with build and test targets
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 10:40:55 -07:00
Michael Crosby 53a67a77b9 Update dockerfile for running tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 10:32:31 -07:00
Michael Crosby 80c1ae9051 Merge pull request #64 from vishh/runin
Adding RunIn to run a user specified command in an existing container.
2014-07-22 17:19:20 -07:00
Michael Crosby b2337e4860 Fix runin code for nsinit
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-22 19:50:00 +00:00
Vishnu Kannan bb85e2b07a 'nsinit exec' now uses namespaces.RunIn instead of namespaces.ExecIn.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-22 19:50:00 +00:00
Vishnu Kannan 1f2828770d Updated RunIn API to match the new console handling behavior in HEAD.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-22 19:49:59 +00:00
Vishnu Kannan 145299f9d8 Adding RunIn to run a user specified command in an existing container, wait for it to exit and return the exit code.
RunIn will connect to a user specified Terminal before running the command.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-22 19:49:59 +00:00
Michael Crosby 1f3d65f5fd Merge pull request #115 from tianon/travis-arm
Add "linux/arm" to Travis
2014-07-22 10:24:13 -07:00
Tianon Gravi 29d9a4d364 Add "linux/arm" to Travis
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-21 23:47:13 -06:00
Victor Marmol 2d0c1a1c01 Merge pull request #114 from vmarmol/cgroups
Small fix for GetAllCgroups().
2014-07-21 22:17:17 -07:00
Victor Marmol de63d7006b Small fix for GetAllCgroups().
Incorrect parsing of length of fields.

Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
2014-07-21 18:55:06 -07:00
Michael Crosby 47d9567ccf Merge pull request #107 from vishh/dev_null
Reopening stdin, stdout and stderr if they are pointing to /dev/null.
2014-07-21 14:11:42 -07:00
Michael Crosby 00c55b3966 Merge pull request #46 from dhammika/44-delete-bridge
Add netlink hooks to delete a bridge dev #44
2014-07-21 11:29:24 -07:00
Michael Crosby 81c2d3aade Merge pull request #113 from tianon/travis-cgo
Add more Travis matrix targets (being explicit about CGO)
2014-07-21 11:18:37 -07:00
Tianon Gravi fbe52bc257 Add more Travis matrix targets (being explicit about CGO)
I've also updated the comments with the current status of the commented-out targets (since we're getting close to having them available for our Travis-use in the relevant upstreams).

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-21 10:35:29 -06:00
Victor Marmol 926cd814d0 Merge pull request #112 from tianon/travis-cross-again
Add linux/386 testing back to Travis
2014-07-18 16:00:14 -07:00
Tianon Gravi b718ecfd7d Add linux/386 testing back to Travis
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-18 16:25:00 -06:00
Victor Marmol cf45d141db Merge pull request #111 from tianon/fix-cross
Fix 386 and arm cross-compile
2014-07-18 15:19:44 -07:00
Tianon Gravi 6fca833e4d Fix 386 and arm cross-compile
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-18 16:08:54 -06:00