Commit Graph

578 Commits

Author SHA1 Message Date
Dhammika Pathirana 2d69029a83 Add netlink hooks to delete a bridge dev
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>

Docker-DCO-1.1-Signed-off-by: Dhammika Pathirana <dhammika@gmail.com> (github: dhammika)
2014-07-10 23:26:27 -07:00
Victor Marmol b325827144 Merge pull request #85 from vieux/remove_duplicate_caps
remove 2 duplicate caps
2014-07-10 21:29:09 -07:00
Victor Vieux 35e32b98cc remove 2 duplicate caps
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-11 00:31:35 +00:00
Michael Crosby e79b114a3a Merge pull request #84 from tianon/travis-all
Update Travis to test all the packages
2014-07-10 11:38:51 -07:00
Michael Crosby 1e643a7d2e Merge pull request #79 from rjnagal/cgroup_testing
Add a standalone test utility for cgroup package.
2014-07-10 11:20:48 -07:00
Tianon Gravi 1c0ea4a3e4 Update Travis to test all the packages
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-10 11:38:56 -06:00
Victor Marmol 52e70ecc5e Merge pull request #83 from cf-guardian/create
Use conventional factory terminology
2014-07-10 10:32:03 -07:00
Glyn Normington b42d0cb1da Use conventional factory terminology
The Initialize method is responsible for creating a new Container instance
and calling it Create makes the factory pattern more obvious. Clearly
creating a Container instance involves initialising the instance.

Docker-DCO-1.1-Signed-off-by: Glyn Normington <gnormington@gopivotal.com> (github: glyn)
2014-07-10 11:50:51 +01:00
Michael Crosby ca2de1bc2c Merge pull request #81 from crosbymichael/update-factory
Add Load method to factory
2014-07-09 17:30:29 -07:00
Michael Crosby 33855392d8 Replace ID with Path on the container
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-09 17:02:36 -07:00
Michael Crosby 5001b7e841 Add Load method to factory
Also update Initialize to take a path to the container
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-09 16:58:59 -07:00
Victor Marmol 32221d509b Merge pull request #77 from leetreveil/spelling
Fix spelling
2014-07-09 13:59:06 -07:00
Dan Walsh 49951d95c8 Allow caller to change the labels on a directory tree.
We want to add this to libcontainer so that we can change docker so that
when you volume mount into a labeled container, we want to allow the
administrator/user the ability to tell docker to fix the labels on the mount.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-07-09 14:40:13 -04:00
Victor Marmol c427473a9d Merge pull request #80 from rjnagal/cgroup-cleanup
Change checks for non-existent cgroup file to a more concise form.
2014-07-09 09:59:17 -07:00
Rohit Jnagal 0916444691 Improved comment and names.
Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
2014-07-09 16:54:55 +00:00
Rohit Jnagal dceaa2e7b3 Cleanup checks for non-existent cgroup file to be concise.
Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
2014-07-09 16:39:38 +00:00
Rohit Jnagal c1d25c185e Add a standalone test utility for cgroup package.
Although it has some overlap with nsinit utility, it is useful to test
cgroup functinality directly and try out new or internal features not
exposed through nsinit.

It still needs some work as I haven't added enough systemd support yet.
I also need to expose an enter method.

Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
2014-07-09 01:21:26 +00:00
Victor Marmol 46e34cf630 Merge pull request #76 from vmarmol/api-init
Adding Initialize() to create a new container.
2014-07-08 17:59:04 -07:00
Victor Marmol ff8b888060 Merge pull request #78 from crosbymichael/rename-nsinit-main
Rename package correctly so the binary is nsinit
2014-07-08 16:44:45 -07:00
Michael Crosby 704a90bec4 Rename package correctly so the binary is nsinit
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-08 16:36:59 -07:00
Lee Treveil 6a3cea177c Fix spelling
Docker-DCO-1.1-Signed-off-by: Lee Treveil <leetreveil@gmail.com> (github: leetreveil)
2014-07-09 00:14:51 +01:00
Victor Marmol c90a2c53bc Adding Initialize() to create a new container.
Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
2014-07-08 16:02:12 -07:00
Rohit Jnagal 8e3130d7fd Merge pull request #75 from vmarmol/fix-stats
Ignore stats that are not available
2014-07-08 14:31:16 -07:00
Victor Marmol b18a4fdf2e Ignore stats that are not available
Closes #13

Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
2014-07-08 14:25:55 -07:00
Rohit Jnagal 12c465c1d2 Merge pull request #67 from vmarmol/api2
Basic version of libcontainer API.
2014-07-08 13:22:40 -07:00
Victor Marmol a01dde8b65 Merge pull request #74 from rjnagal/cgroup_testing
Add a cleanup method to cgroup fs. This will help in building a
2014-07-08 13:21:45 -07:00
Rohit Jnagal d712d29b9a Add a cleanup method to cgroup fs. This will help in building a
standalone cgroup test util. systemd does auto cleanup on empty, so
doesn't need an extra interface.

Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
2014-07-08 18:49:45 +00:00
Michael Crosby dbb515f01f Update api proposal
Move concepts into specific files for easy management
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: vmarmol)
2014-07-08 11:27:27 -07:00
Victor Marmol 173642ab0b Basic version of libcontainer API.
This version has mostly the behavior available today and the
functionality agreed upon in other PRs. Further changes will be sent as
smaller PRs for discussion.

Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
2014-07-07 18:20:08 -07:00
Michael Crosby 99458b9c57 Merge pull request #60 from tianon/cross-travis
Add cross-compilation testing to .travis.yml
2014-07-07 10:50:33 -07:00
Victor Marmol 39ebd07a82 Merge pull request #61 from vishh/split_nsinit
Separate nsinit main from implementation
2014-07-01 16:06:29 -07:00
Vishnu Kannan 28dadc538c Separate nsinit main from implementation. This is done inorder to package nsinit as part of docker binary.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-07-01 22:00:15 +00:00
Tianon Gravi 4f2dd420be Add cross-compilation testing to .travis.yml
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-06-30 17:08:01 -06:00
maebashi 16f939a958 fix the order of setns()
Docker-DCO-1.1-Signed-off-by: Takahiro Maebashi <maebashi@iij.ad.jp> (github: maebashi)
2014-06-29 20:05:09 +09:00
Victor Marmol 77c5125e87 Merge pull request #56 from crosbymichael/nsinit-pause
Add pause and unpause commands to nsinit
2014-06-26 18:17:13 -07:00
Michael Crosby 3f0764fa51 Add pause and unpause commands to nsinit
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 16:45:18 -07:00
Victor Marmol 14567adea1 Merge pull request #55 from crosbymichael/nsinit-config
Rename nsinit spec to config and only display raw json
2014-06-26 16:37:36 -07:00
Michael Crosby 361ac10612 Just output raw stats json
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 16:25:55 -07:00
Michael Crosby 21b71ef33d Rename spec to config
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 16:24:16 -07:00
Michael Crosby 53cfe0a1eb Merge pull request #54 from crosbymichael/report-child-error
Report child error to parent
2014-06-26 14:38:11 -07:00
Michael Crosby a980a961c1 Return error on shutdown call
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 14:18:39 -07:00
Michael Crosby bd7d1eb7b6 Fix parent type in sync pipe
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 14:08:49 -07:00
Michael Crosby e098c02ef7 Update tests for network state
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 14:06:26 -07:00
Michael Crosby 73ff1addf9 Fix cross compile with syscall
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 14:03:49 -07:00
Michael Crosby e7916505a3 Add unit test for sync pipe
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 14:03:49 -07:00
Michael Crosby eb9a561b18 Address review comments
Ensure that the command is killed if we receive an error from the child
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-06-26 14:02:43 -07:00
Alexander Larsson ca9544522e Report child error better (and later)
We use a unix domain socketpair instead of a pipe for the sync pipe,
which allows us to use two-way shutdown. After sending the
context we shut down the write side which lets the child know
it finished reading.

We then block on a read in the parent for the child closing the file
(ensuring we close our version of it too) to sync for when the child
is finished initializing. If the read is non-empty we assume this
is an error report and fail with an error. Otherwise we continue as
before.

This also means we're now calling back the start callback later,
meaning at that point its more likely to have succeeded, as well as
having consumed all the container resources (like volume mounts,
making it safe to e.g. unmount them when the start callback is
called).

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-06-26 14:02:43 -07:00
Michael Crosby f975ff9159 Merge pull request #25 from vishh/network_stats
Adding per container network stats
2014-06-26 13:58:18 -07:00
Vishnu Kannan 813d247bc7 Fixing some nits.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-06-26 20:49:02 +00:00
Victor Marmol dfb1ea8171 Merge pull request #43 from cf-guardian/nsinit_usage
Improve nsinit usage instructions
2014-06-26 07:09:11 -07:00