Commit graph

1718 commits

Author SHA1 Message Date
Mrunal Patel
fa6e2d81f9 Merge pull request #711 from mheon/rename_kpod_files
Rename libkpod files to follow Go conventions
2017-07-31 12:48:13 -07:00
Matthew Heon
4205b222a2 Rename libkpod files to follow Go conventions
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-07-31 10:11:40 -04:00
Mrunal Patel
3103524dea Merge pull request #707 from TomSweeneyRedHat/dev/tsweeney/docfix
Make the kpod manpages a bit more uniform
2017-07-30 07:53:22 -07:00
Mrunal Patel
0ae7443ee1 Merge pull request #668 from umohnani8/kpod_load
Add kpod load
2017-07-30 07:52:55 -07:00
TomSweeneyRedHat
b0fac5596c Make the kpod manpages a bit more uniform
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2017-07-29 13:26:21 -04:00
umohnani8
412b98be26 Add 'kpod load' command
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-07-28 22:30:48 -04:00
Mrunal Patel
79c5160e5a Merge pull request #700 from nalind/kpod-updates
kpod: display image dates from inspection data, and don't display non-OCI settings in "inspect"
2017-07-28 19:08:39 -07:00
Nalin Dahyabhai
5e97d2a1e2 libkpod: remove non-OCI information from inspect
Remove the non-OCI version of the configuration structure, and the
parent image ID, from the ImageData that libkpod returns.

At runtime, cri-o is only ever going to use the OCI configuration
(possibly converted from another format by the image library) when
setting up a container, so it can be confusing to display settings in
"kpod inspect" that might be discarded when we try to run a container.

Remove the non-OCI version of the configuration structure, and the
hard-coded Type field, from the ContainerData that libkpod returns.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-28 16:58:12 -04:00
Nalin Dahyabhai
40117e8bfe Use inspected creation dates
We already parse every image if there's a label filter so that we can
check against the filter, so when we do that, go ahead and read the
OCI-format configuration and inspection data as well, and use an image's
creation date as recorded in inspection data everywhere.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-28 16:58:12 -04:00
Mrunal Patel
1deb9795c3 Merge pull request #705 from 14rcole/kpod-save-config
Switch kpod save to use config
2017-07-28 13:51:31 -07:00
Ryan Cole
2cb57e0cb5 Switch kpod save to use config
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-28 15:51:11 -04:00
Mrunal Patel
d2a82a28c1 Merge pull request #678 from umohnani8/kpod_save
Add 'kpod save' command
2017-07-28 10:49:49 -07:00
Mrunal Patel
5530764809 Merge pull request #702 from rhatdan/man
remove kpod-push.1.md from wrong directory.
2017-07-28 08:37:43 -07:00
Mrunal Patel
13c874753c Merge pull request #693 from 14rcole/libkpod-config
add basic config struct to libkpod
2017-07-28 06:24:45 -07:00
Daniel J Walsh
eace36ee64 kpod-push.1.md in wrong directory.
Their is a kpod-push.1.md man page in docs directory.
This is a bogus location.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-07-28 10:53:44 +00:00
Ryan Cole
a8b6f2ad8a Update kpod commands to use getConfig()
Make getStore() take a config struct from which it pulls the store
options, then update the kpod commands so that they call getConfig()
and pass the config into getStore()

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-27 15:58:55 -04:00
umohnani8
ff5eda509a Add 'kpod save' command
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-07-27 13:35:30 -04:00
Mrunal Patel
9dbd60a0df Merge pull request #698 from nalind/kpod-updates
kpod: avoid digging into unpublished formats
2017-07-27 10:20:46 -07:00
Ryan Cole
0c8f106ee8 add basic config struct to libkpod
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-27 11:12:50 -04:00
Mrunal Patel
c0bfa01c66 Merge pull request #699 from rhatdan/vendor
vendor in Update containers/image to add support for kpod save
2017-07-27 06:55:45 -07:00
Dan Walsh
acd3fd03c5 vendor in Update containers/image to add support for kpod save
This update allows the creation of docker-archive files when the
destination does not exists or is empty.  kpod save needs this functionality.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-07-27 06:47:39 -04:00
Mrunal Patel
f8a822e900 Merge pull request #697 from nalind/image-free
Don't double-free an UnparsedSource
2017-07-26 17:35:39 -07:00
Mrunal Patel
0c115d8ecc Merge pull request #696 from mrunalp/profile_port
Make the profile port configurable
2017-07-26 15:44:48 -07:00
Nalin Dahyabhai
cb0bb94c68 Avoid parsing image metadata
Avoid parsing metadata that the image library keeps in order to find an
image's top layer and creation date; instead, use the values which the
storage library now makes available, which will be correct once we merge
PR #654 or something like it.

Instead of assuming the last blob which was added for the image was the
manifest, read it directly and compute its digest ourselves.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 16:33:02 -04:00
Nalin Dahyabhai
82c90747c2 Don't double-free an UnparsedSource
github.com/containers/image.FromUnparsedImage() "takes ownership" of the
UnparsedImage that we pass to it, so we shouldn't also Close() the
UnparsedImage ourselves after we've wrapped it up in an Image object.

Since creating an Image is the only thing we do with the UnparsedImage
after creating it from a SourceImage, just use the FromSource() function
to handle both steps at once.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 15:52:51 -04:00
Mrunal Patel
93f1ec3b1f Merge pull request #691 from mheon/remove_server_state
Move remaining server state to libkpod
2017-07-26 11:25:34 -07:00
Mrunal Patel
1f40531dca Make the profile port configurable
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-07-26 10:57:55 -07:00
Nalin Dahyabhai
7e9ac9700b Avoid duplicate image configuration parsing logic
Don't bother trying to find and parse the image's configuration blob
after we've already done it; just reuse the value.  This frees us from
making the assumption that the last blob which was committed to local
storage was the image's configuration blob.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 12:43:22 -04:00
Nalin Dahyabhai
8957156c41 Parse out image names as repotags and repodigests
Parse the set of image names as tagged references, canonical references,
or repository names to which we add the default tag, and return them in
libkpod.ImageData reports.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 12:43:22 -04:00
Mrunal Patel
120af8ef01 Merge pull request #692 from nalind/api-usage
Fix a couple of bugs in our use of containers/storage and containers/image
2017-07-26 09:35:11 -07:00
Nalin Dahyabhai
3747048aa4 Don't leak containers/image Image references
In-memory image objects created using an ImageReference's NewImage()
method need to be Close()d.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-25 13:30:54 -04:00
Nalin Dahyabhai
2e50006f1c Avoid using lower-level storage APIs
Switch from using the lower-level storage APIs (accessing LayerStore,
ImageStore, and ContainerStore types directly) in favor of the
higher-level ones that take care of synchronization and locking for us.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-25 13:29:49 -04:00
Matthew Heon
158893bd1a Move Pod ID and Name indexes into libkpod
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-07-25 11:46:22 -04:00
Matthew Heon
ece055327a Move Sandbox state into libkpod
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-07-25 11:46:15 -04:00
Antonio Murdaca
065960386f Merge pull request #676 from 14rcole/libkpod-image
move kpod logic into libkpod/image
2017-07-25 17:39:56 +02:00
Ryan Cole
18f94f38ba Remove GetImage() and make rmi use more robust FindImage()
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-25 09:02:45 -04:00
Mrunal Patel
8fd089c570 Merge pull request #685 from 14rcole/libkpod-serverfunctions
Libkpod serverfunctions
2017-07-24 16:29:31 -07:00
Mrunal Patel
4cce851851 Merge pull request #688 from giuseppe/conmon-do-not-leave-zombies
conmon: use waitpid to wait for terminated processes
2017-07-24 14:50:17 -07:00
Ryan Cole
c1706475c0 move functions supporting rmi command to libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 16:17:26 -04:00
Ryan Cole
0f44ff1d3b move functions supporting images command to libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:35:36 -04:00
Ryan Cole
df7536e3c0 move PushImage and PullImage to libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:35:36 -04:00
Ryan Cole
14864f820e move code supporting push, pull, and inspect to libkpod and libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:35:36 -04:00
Ryan Cole
2c1fd1ad3f move container-related functions out of kpod and into libkpod
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:34:55 -04:00
Ryan Cole
a68a981d0b move image-related functions out of cmd/kpod/common.go and into libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:34:55 -04:00
Ryan Cole
95e17b4a73 move driver and image metadata to libkpod
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:34:55 -04:00
Ryan Cole
314d55f284 move shutdown function into libkpod and have server call in to it
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:32:02 -04:00
Mrunal Patel
a95bbe9608 Merge pull request #687 from nalind/vendor
Bump vendored containers/image, containers/storage, and add ostreedev/ostree-go
2017-07-24 11:07:08 -07:00
Nalin Dahyabhai
eebbd6a098 Add notes to README.md about needing ostree-dev
Add notes to README.md about needing to install ostree-devel, or
libostree-dev, or building ostree from source.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-24 13:03:09 -04:00
Nalin Dahyabhai
1e1d6a512f Build with ostree
Build using a locally-built copy of ostree in testing setups.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-24 13:03:07 -04:00
Dan Walsh
d76645680f Bump image, storage, and image-spec
Bump containers/image (pulling in its new dependency on ostree-go),
containers/storage, and updated image-spec.

This pulls in the OCI v1.0 specifications and code that allows us to
support 1.0 images.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-24 13:01:54 -04:00