Commit Graph

564 Commits

Author SHA1 Message Date
Michael Crosby 70367b2cf3 Improve execin to support registering funcs
This also changes the functionality of the default exec in to just be an
existing func that is called than handles the implementation to exec a
user user's process inside the container.  This implements this
functionallity in nsinit but is a base for how we will be handling these
types of features inside docker.

Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-12 11:43:12 -07:00
Michael Crosby 51e6049226 Make nsinit package main only
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-12 10:48:12 -07:00
Michael Crosby 9378c05c37 Remove nsinit main calling pkg
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-12 10:45:41 -07:00
Michael Crosby d9e307741f Merge pull request #152 from crosbymichael/addsetns-by-fd
Expose setting interface by fd in network pkg
2014-08-12 10:41:21 -07:00
Michael Crosby 47998d3663 Merge pull request #149 from milosgajdos83/modify-PR118
Modification of erikh/netlink-remove-address PR
2014-08-12 10:38:28 -07:00
Michael Crosby 64771adcf0 Merge pull request #153 from LK4D4/travis_badge
Add travis status badge
2014-08-12 10:32:36 -07:00
Alexandr Morozov 680c1f5205 Add travis status badge
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-12 09:09:25 +04:00
Milos Gajdos fe8937c745 Fixing a copy-cat from original PR.
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-12 03:12:26 +01:00
Michael Crosby f0278ac587 Expose setting interface by fd in network pkg
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-11 18:56:58 -07:00
Michael Crosby c86d089950 Merge pull request #151 from mrunalp/add_maintainer
Add myself as maintainer.
2014-08-08 16:38:15 -07:00
Mrunal Patel a0866273b7 Add myself as maintainer.
Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2014-08-08 19:32:34 -04:00
Michael Crosby f2e78425c3 Merge pull request #146 from crosbymichael/refactor-execin
Refactor execin send config over pipe
2014-08-08 16:06:41 -07:00
Michael Crosby fc05554fdb Allow comparison based on strlen of "nsenter"
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 15:44:18 -07:00
Michael Crosby 4d1d6185ab Add unsupported file for cross compile
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 12:14:48 -07:00
Michael Crosby 3abf1dd99e Modify nsinit to register actions for argv 0
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 11:16:56 -07:00
Michael Crosby cdff060b63 Nsenter checks for argv 0 before running
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 11:11:23 -07:00
Michael Crosby c8aa9323f1 Import nsenter code so that it is compiled into nsinit
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 10:43:18 -07:00
Michael Crosby 86f6df8993 Move nsenter code into separate package
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 10:42:19 -07:00
Milos Gajdos b9ad475f6a Fixed typo ipAssingned -> ipAssigned
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-08 12:24:18 +01:00
Milos Gajdos 0060267a8b Tabbed the test build spec in Makefile
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-08 03:07:30 +01:00
Milos Gajdos f9ae794564 Added NetworkLinkDelIp() into netlink_unsupported.go
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-08 03:04:36 +01:00
Milos Gajdos 356d006895 This is a modification of erikh/netlink-remove-address PR
This is a modification of original PR by @erikh (R118)
to keep the netlink codebase more consistent and my OCD
under control :-)

Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-08 02:55:02 +01:00
Michael Crosby ae9af437f0 After parsing flags check that the command is nsenter
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-07 10:48:29 -07:00
Michael Crosby 5226b39d15 Fix issues in nsenter.c and console handling
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-06 22:04:28 -07:00
Michael Crosby a48b001013 Refactor execin code to be simpler
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-06 18:44:41 -07:00
Michael Crosby 390f413a92 Make syncpipe transport generic data
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-06 18:00:52 -07:00
Michael Crosby 5589d4d879 Merge pull request #139 from milosgajdos83/tenus-libcontainer
RtAttr packaging fix. Added NetworkLinkDel() func and a new test.
2014-08-05 17:58:50 -07:00
Milos Gajdos 3ff181bb20 Replacing t.Fatal() with t.Fatalf()
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-06 01:29:37 +01:00
Milos Gajdos e8abb5ca89 Replaced log.Fatalf() with t.Fatalf()
No need to import log package.

Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-06 01:08:40 +01:00
Milos Gajdos c5f4d90da5 Fixed rtnetlink attributes packaging into netlink message.
I've also added NetworkLinkDel() function which allows deleting
of the existing network links.

Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-06 01:08:21 +01:00
Michael Crosby f538117a7b Merge pull request #144 from crosbymichael/move-c-code
Move nsenter C code to separate file
2014-08-05 16:13:35 -07:00
Michael Crosby 8b6c0b7ec6 Add linux style formatting
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-05 16:04:18 -07:00
Michael Crosby f3b0a3a0e6 Move nsenter C code to separate file
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-05 16:04:08 -07:00
Michael Crosby f79bccbcf0 Merge pull request #141 from vishh/runin_support
Change nsenter to support docker 'runin'
2014-08-05 15:18:39 -07:00
Vishnu Kannan f90eee10ef Remove debug message.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-05 22:13:23 +00:00
Vishnu Kannan 74b99b8dd6 Check for "nsenter" in args before parsing flags. Addressed comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-05 22:13:23 +00:00
Vishnu Kannan e5e40b6ef0 Docker 'runin' demands passing flags before 'nsenter' cli option.
Docker does not require RunIn API. Hence that API has been removed.
nsinit CLI has been modified to work around the nsenter changes.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-05 22:13:23 +00:00
Michael Crosby 54cf66e07b Merge pull request #140 from tianon/vendor
Add "update-vendor.sh" script and vendor our current deps...
2014-08-05 10:54:34 -07:00
Tianon Gravi 43cdc5934e Run update-vendor.sh to vendor our deps
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-08-04 17:24:17 -06:00
Tianon Gravi e9f44b52de Add "update-vendor.sh" script and vendor our current deps (minus Docker, since that'd make a circle)
Also, updated .travis.yml to use the new "vendor" directory (since this is pretty pointless without that :D)

Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-08-04 17:24:11 -06:00
Victor Marmol 68ea1234a0 Merge pull request #137 from mrunalp/dev/moveuplockthread
Lock the thread first thing in init.
2014-08-03 10:14:54 -07:00
Mrunal Patel 7f3bbbb47b Move locking to caller.
Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2014-08-01 19:06:56 -04:00
Victor Marmol ef3c88435e Merge pull request #136 from bernerdschaefer/nsinit-exec-with-flags
DefaultCreateCommand supports command w/ flags
2014-07-31 14:24:53 -07:00
Bernerd Schaefer 041fafc763 DefaultCreateCommand supports command w/ flags
namespaces.DefaultCreateCommand prepends the user-supplied command to
execute with "--", so that "nsinit init" does not attempt to interpret
it.

Docker-DCO-1.1-Signed-off-by: Bernerd Schaefer <bj.schaefer@gmail.com> (github: bernerdschaefer)
2014-07-31 21:32:10 +02:00
Rohit Jnagal 164cd807a1 Merge pull request #135 from peterbourgon/master
Only import "testing" from *_test.go
2014-07-30 09:33:29 -07:00
Peter Bourgon c6edb4ad96 Only import "testing" from *_test.go
This prevents the testing package flags from leaking into the
flagsets of binaries that import libcontainer.

Docker-DCO-1.1-Signed-off-by: Peter Bourgon <peter@bourgon.org> (github: peterbourgon)
2014-07-30 18:15:12 +02:00
Rohit Jnagal bc06326a5e Merge pull request #134 from tianon/fix-more-dotclouds
Update more "dotcloud/docker" refs to "docker/docker"
2014-07-29 10:56:40 -07:00
Tianon Gravi 95ce3af4d0 Update more "dotcloud/docker" refs to "docker/docker"
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-29 11:21:55 -06:00
Victor Marmol 625c65804e Merge pull request #103 from tianon/user
Move "pkg/user" into libcontainer...
2014-07-29 10:04:57 -07:00
Tianon Gravi e31771fa42 Move "pkg/user" into libcontainer and add support for GetUserGroupSupplementary to return "Home" too
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-29 10:59:18 -06:00