Commit Graph

1477 Commits

Author SHA1 Message Date
Evan Hazlett
02fa534d71 ctr: enable specifying additional environment variables
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-24 18:24:31 -04:00
Michael Crosby
ab137bfef8 Merge pull request #899 from ijc25/prepareStdio-named-return
prepareStdio: use named return for err
2017-05-24 09:22:47 -07:00
Kenfe-Mickaël Laventure
3752565920 Merge pull request #896 from dmcgowan/container-metadata-bolt
Store container metadata in boltdb buckets
2017-05-24 07:47:41 -07:00
Ian Campbell
d7deba03a2 prepareStdio: use named return for err
This avoids issues with the various deferred error handlers in the event that
`err` is shadowed or named differently, which this function currently avoids
but which is an easy trap to fall into.

Since named return values are all or nothing we need to name the waitGroup too
and adjust the code to suite.

Thanks to Aaron Lehmann for the suggestion, see also
https://github.com/docker/swarmkit/pull/1965#discussion_r118137410

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-24 15:34:39 +01:00
Phil Estes
c257deb1a0 Merge pull request #895 from dmcgowan/delete-windows-snapshotter
Skip snapshot removal on windows
2017-05-24 04:59:31 -04:00
Derek McGowan
40d338b12c
Skip snapshot removal on windows
Windows snapshotter is not yet implemented

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-23 17:18:31 -07:00
Derek McGowan
f98a4f10df
Store container metadata in boltdb buckets
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-23 17:11:29 -07:00
Kenfe-Mickaël Laventure
c00d731cc2 Merge pull request #894 from dmcgowan/container-metadata-service
[carry #859] api/services: define the container metadata service
2017-05-23 17:01:05 -07:00
Kenfe-Mickaël Laventure
db6194b918 Merge pull request #893 from ehazlett/bump-fifo
Bump fifo dependency to 69b995
2017-05-23 14:47:31 -07:00
Derek McGowan
e1ed4a2ea4
Add json storage for container storage
This is just a temporary storage solution to get
containers running on the new code.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-23 14:22:20 -07:00
Evan Hazlett
617a2270f6
bump fifo dependency to 69b995
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-23 14:14:54 -04:00
Stephen J Day
539742881d
api/services: define the container metadata service
Working from feedback on the existing implementation, we have now
introduced a central metadata object to represent the lifecycle and pin
the resources required to implement what people today know as
containers. This includes the runtime specification and the root
filesystem snapshots. We also allow arbitrary labeling of the container.
Such provisions will bring the containerd definition of container closer
to what is expected by users.

The objects that encompass today's ContainerService, centered around the
runtime, will be known as tasks. These tasks take on the existing
lifecycle behavior of containerd's containers, which means that they are
deleted when they exit. Largely, there are no other changes except for
naming.

The `Container` object will operate purely as a metadata object. No
runtime state will be held on `Container`. It only informs the execution
service on what is required for creating tasks and the resources in use
by that container. The resources referenced by that container will be
deleted when the container is deleted, if not in use. In this sense,
users can create, list, label and delete containers in a similar way as
they do with docker today, without the complexity of runtime locks that
plagues current implementations.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-05-22 23:27:53 -07:00
Qiang Huang
8f3b89c79d Merge pull request #890 from darrenstahlmsft/revendorGowinio
Update go-winio to v0.4.1
2017-05-23 10:21:59 +08:00
Phil Estes
347c48437c Merge pull request #888 from dmcgowan/remove-travis-1.7
Remove go 1.7 in travis
2017-05-22 20:27:11 -04:00
Darren Stahl
ae6f82241d Update go-winio to v0.4.1
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-05-22 17:08:03 -07:00
Derek McGowan
962d991a44 Merge pull request #887 from crosbymichael/mounts
Move Mount into mount pkg
2017-05-22 16:50:46 -07:00
Derek McGowan
a7e8928a08
Remove go 1.7 in travis
Support for go 1.7 is no longer targeted. Remove to allow
features added since go 1.7.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-22 16:48:53 -07:00
Michael Crosby
d7af92e00c Move Mount into mount pkg
This moves both the Mount type and mountinfo into a single mount
package.

This also opens up the root of the repo to hold the containerd client
implementation.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-22 16:41:12 -07:00
Derek McGowan
b07504c713 Merge pull request #862 from crosbymichael/checkpoint
Initial Support for Checkpoint && Restore
2017-05-22 15:51:10 -07:00
Derek McGowan
a7e6528505 Merge pull request #884 from ehazlett/ctr-mounts
Add --mount option to ctr
2017-05-22 15:47:40 -07:00
Michael Crosby
7cc1b64bd8 Add checkpoint and restore
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Update go-runc to 49b2a02ec1ed3e4ae52d30b54a291b75

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add shim to restore creation

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Keep checkpoint path in service

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add C/R to non-shim build

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Checkpoint rw and image

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Pause container on bind checkpoints

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Return dump.log in error on checkpoint failure

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Pause container for checkpoint

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Update runc to 639454475cb9c8b861cc599f8bcd5c8c790ae402

For checkpoint into to work you need runc version
639454475cb9c8b861cc599f8bcd5c8c790ae402 + and criu 3.0 as this is what
I have been testing with.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Move restore behind create calls

This remove the restore RPCs in favor of providing the checkpoint
information to the `Create` calls of a container.  If provided, the
container will be created/restored from the checkpoint instead of an
existing container.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Regen protos after rebase

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-22 15:34:45 -07:00
Evan Hazlett
ef026e83fa add --mount option to ctr
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-22 16:48:34 -04:00
Kenfe-Mickaël Laventure
a7f5c20b0f Merge pull request #883 from crosbymichael/report-may19
Add dev report for may 19
2017-05-22 09:29:35 -07:00
Phil Estes
0cd93ba618 Merge pull request #882 from mlaventure/order-exit-events
Ensure shim start & exit events are sent in right order
2017-05-22 12:12:16 -04:00
Michael Crosby
3c3352cea6 Add dev report for may 19
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-22 08:59:08 -07:00
Kenfe-Mickael Laventure
8ca92a2aa8 Ensure shim start & exit events are sent in right order
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-05-19 15:31:18 -07:00
Stephen Day
e4bb820b55 Merge pull request #878 from crosbymichael/runc
Add RUNC.md file for runc supported version
2017-05-19 12:41:33 -07:00
Stephen Day
14671353af Merge pull request #880 from dmcgowan/fix-content-reader-bug
Clear extra in content service reader after consumed
2017-05-19 12:37:32 -07:00
Derek McGowan
e0136cc83f
Clear extra in content service reader after consumed
Avoid bugs where content can mistakenly be read from
extra after an EOF is returned.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-19 11:37:40 -07:00
Michael Crosby
fa1be5dfb8 Add RUNC.md file for runc supported version
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-19 11:18:18 -07:00
Phil Estes
5ee77fc281 Merge pull request #876 from stevvooe/nice-enum-values
api/types/container: nice enum values for status
2017-05-19 11:19:22 -04:00
Phil Estes
761534ec38 Merge pull request #877 from stevvooe/consistent-id-protobuf
protos: remove need for customname on ID fields
2017-05-19 11:17:42 -04:00
Stephen J Day
cb68150a2f
protos: remove need for customname on ID fields
Credit to Aaron Lehmann for the implementation from SwarmKit.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-05-18 18:50:59 -07:00
Stephen Day
0f0f3b69dc Merge pull request #875 from Random-Liu/return-not-found-on-delete
Return ErrNotFound when deleting a non-exist image.
2017-05-18 17:53:20 -07:00
Stephen J Day
178b4275ca
api/types/container: nice enum values for status
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-05-18 17:48:20 -07:00
Stephen Day
0dbe46d952 Merge pull request #824 from ehazlett/signal-specific-pid
Support to signal container process by pid
2017-05-18 17:01:10 -07:00
Random-Liu
c163673ba3 Return ErrNotFound when deleting a non-exist image.
Signed-off-by: Random-Liu <lantaol@google.com>
2017-05-18 15:49:39 -07:00
Michael Crosby
3f02f5f2ee Merge pull request #874 from estesp/oci-spec-reference-vers
Reference actual versions for specs in vendor.conf
2017-05-18 13:58:05 -07:00
Phil Estes
26f4d4448e
Reference actual versions for specs in vendor.conf
For runtime and image spec from OCI, reference the actual versions
instead of a git hash for clarity on versions in use.

Actual impact was zero; runtime spec was the exact hash of the released
rc5 already, image spec was one commit behind the tagged release, but
made no code changes other than version string.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-05-18 16:46:28 -04:00
Michael Crosby
eef22d77b4 Merge pull request #873 from justincormack/make-flags
Allow adding additional ldflags and other build flags
2017-05-18 09:47:15 -07:00
Evan Hazlett
c17ef22a75 windows: use ProcessList from shim for pids
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-18 11:05:48 -04:00
Evan Hazlett
70dd7fcc60 shim: Ps -> Processes
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-18 11:05:48 -04:00
Evan Hazlett
395d21018f PsRequest/PsResponse -> ProcessesRequest/ProcessesResponse; added Any to types.Process
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-18 11:05:48 -04:00
Evan Hazlett
ef158f8b5e add support to kill container process by pid
This adds support for signalling a container process by pid.

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

make Ps more extensible

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

ps: windows support

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-18 11:05:48 -04:00
Justin Cormack
508ff6e9c3 Allow adding additional ldflags and other build flags
For LinuxKit we build Go executables as static pie binaries, so
need to be able to add extra build and link flags.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-18 15:52:32 +01:00
Michael Crosby
ae70dc4de1 Merge pull request #870 from estesp/update-email
Update with preferred email address
2017-05-17 11:21:36 -07:00
Phil Estes
d2c0f309d9
Update with preferred email address
Update MAINTAINERS file with my preferred email address as others use
this to send mail, add to mailing lists, etc. My
contributor/Signed-off-by is a valid address, but not the one I use for
community interactions.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-05-17 14:09:15 -04:00
Stephen Day
fae11b6673 Merge pull request #863 from dmcgowan/diff-service
Implementation for diff service
2017-05-16 15:27:21 -07:00
Michael Crosby
cd282f458a Merge pull request #864 from mlaventure/revert-rootfs-error
Revert "Merge pull request #853 from AkihiroSuda/check-rootfs"
2017-05-16 15:05:27 -07:00
Michael Crosby
ce0c802bae Merge pull request #865 from mlaventure/close-stdin-pipe-if-not-requested
Close stdin on create if it wasn't requested and there's no terminal
2017-05-16 15:05:15 -07:00