Teach image and container store types to also track the digests of "big
data" items that we have them store.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When we read itms from disk, if maps in the structures are empty, they
won't be allocated as part of the decoding process. When we
subsequently go to read or write something from such a map, make sure
it's been initialized.
Add some validation of names that we convert to file names, and of
digest values, so that we can be more precise about the error code we
return when there's a problem with the values.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The skopeo package builds on Darwin use Go 1.7, so make sure we can
build on it, by replacing a call to time.Until(t) with
t.Sub(time.Now()), as suggested in the standard library documentation.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Allow users to specify the maximum size of a containers in the
/etc/containers/storage.conf file. This will enable quota checking
in the drivers that support it.
Allowe users to OverrideKernelCheck to tell drivers to ignore kernel
version checks that indicate whether the driver is supported on that
kernel. These checks do not make sense on older RHEL kernels, since
the driver support was back ported.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Change the labels we use when displaying our settings as part of a debug
log, and prepend that information to the "status" output.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Fix the weird formatting of the output from the various create commands
and the import-layer command.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
We need to be able to create images which consist of just a list of
manifests, and those don't contain layers, so relax CreateImage()'s
requirement that a layer be specified.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Take a guess at the final size of some slices that we build up item by
item, and try to allocate enough capacity for them before starting to
build them. It's probably not a big speedup, though.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
We already deduplicated names in Store.SetNames(), but we weren't also
doing that when creating layers, images, and containers, or in the
individual store SetNames() methods.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Currently RHEL7.4 or later OS is required to support DType well.
We want to eventually make this an error if you select overlay on
a file system without DType, but for now in order to allow
containers/storage to get merged into CRI-O we need to relax this
constraint since the Test infrastucture does not have support.
Once we have the support we can revert this change.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
We don't support plugin drivers in containers/storage
at this time. Remove them so we don't have to maintain them.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Add back in these interfaces since containers/image is using.
archive.UntartPath
archive.IsArchive
Also add back this constant for containers/image.
archive.HeaderSize
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Update searches of read-only layer and image stores to match naming
conventions in the updated Names() method.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The SetNames() method actually deduplicates the name list that it's
given, so make a note of that in the godoc.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The Store's Lookup() method didn't check for layers and images in
read-only locations, which it should have. Correct that.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
umohnani noticed that Store.Names() was hitting a deadlock - when
attempting to iterate through the concatenated list of read-write and
read-only image stores, the method was actually walking the list of
read-write and read-only layer stores a second time, so when it
attempted to obtain a lock on the first layer store, it would deadlock.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Had to vendor in a new version of golang.org/x/net to build
Also had to make some changes to drivers to handle
archive.Reader -> io.Reader
archive.Archive -> io.ReadCloser
Also update .gitingore to ignore emacs files, containers-storage.*
and generated man pages.
Also no longer test travis against golang 1.7, cri-o, moby have also
done this.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>