Commit Graph

26153 Commits

Author SHA1 Message Date
Nalin Dahyabhai 240fe6016c Wrap new data retrieval APIs in the CLI tool
Add CLI wrappers for the store's
  ImageBigDataDigest
  ImageBigDataSize
  ContainerBigDataDigest
  ContainerBigDataSize
methods.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-10-02 17:50:01 -04:00
Nalin Dahyabhai eace836c44 Track the digests of "big data" items
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>
2017-10-02 17:50:00 -04:00
Daniel J Walsh 232429cdea Merge pull request #107 from nalind/preallocate-slices
Preallocate some slices that we build up
2017-09-30 07:07:48 -04:00
Daniel J Walsh cef49973b4 Merge pull request #114 from nalind/initmaps
Initialize Flags and BigDataSizes maps
2017-09-30 07:07:19 -04:00
Daniel J Walsh c06979818d Merge pull request #113 from nalind/build-1.7
Fix builds with go 1.7
2017-09-30 06:30:55 -04:00
Nalin Dahyabhai 2f258f168e Initialize Flags and BigDataSizes maps
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>
2017-09-29 17:58:47 -04:00
Nalin Dahyabhai 88b9193bae Fix builds with go 1.7
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>
2017-09-29 17:25:19 -04:00
Daniel J Walsh 64bf27465d Merge pull request #112 from rhatdan/config
Specify OverrideKernelCheck and Size in /etc/containers/storage.conf
2017-09-29 16:22:06 -04:00
Daniel J Walsh 6f4e12a6e6 Merge pull request #106 from rhatdan/DType
Move no Dtype on Overlay from Error to warning.
2017-09-29 16:19:44 -04:00
Daniel J Walsh 5d183eb658 Specify OverrideKernelCheck and Size in /etc/containers/storage.conf
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>
2017-09-29 16:16:59 -04:00
Nalin Dahyabhai 84922714d2 Merge pull request #108 from nalind/layerless-images
Stop rejecting creation of images with no layers
2017-09-29 16:16:54 -04:00
Daniel J Walsh 46acf2c518 Merge pull request #110 from nalind/dedupe-names
Be more thorough about deduplicating names
2017-09-29 16:00:40 -04:00
Daniel J Walsh 57b04ec857 Merge pull request #111 from nalind/cli-formatting
Add a "layer" command to the CLI
2017-09-29 15:49:22 -04:00
Nalin Dahyabhai d659609729 Clean up CLI display of settings
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>
2017-09-29 15:07:12 -04:00
Nalin Dahyabhai 2e93f81ed8 Fix weird formatting of CLI "create-*" output
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>
2017-09-29 15:07:05 -04:00
Nalin Dahyabhai b1b3a15bd6 Add a CLI "layer" command
Add a "layer" command, for examining layer records.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-09-29 15:06:59 -04:00
Nalin Dahyabhai 7ccd1bdeb2 Stop rejecting creation of images with no layers
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>
2017-09-29 15:01:26 -04:00
Nalin Dahyabhai 1289ff09a7 Preallocate some slices that we build up
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>
2017-09-29 15:00:59 -04:00
Nalin Dahyabhai 29a5d64633 Wrap the Store.Names() method in the CLI
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-09-29 15:00:19 -04:00
Nalin Dahyabhai a546c6d7a4 Also dedupe layer/image/container names at create
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>
2017-09-29 15:00:09 -04:00
Daniel J Walsh 3054f11ed5 Drop lack of DType support on overlay to warning
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>
2017-09-29 09:30:36 -04:00
Daniel J Walsh dd18b0cb69 Fix spelling mistake
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-29 07:32:54 -04:00
Daniel J Walsh 396aa50ebd Merge pull request #98 from rhatdan/quota
Grab changes form moby/moby/graphdriver for overlay quota
2017-09-26 16:53:13 -04:00
Daniel J Walsh 5cbb75e971 Add size support for containers-storage.conf man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh ca5ce1cfa2 Add moby quota driver into containers/storage
Need this driver to get overlay quota on xfs support

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 7cbf1ed8c5 Backport moby overlay driver changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh e5f58bf9c2 Backport moby overlay driver changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh b8ea56a754 Remove pkg/plugins from containers/storage
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>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 1eba391bd3 Backport moby windows changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 01a6d2bc42 Backport moby vfs changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 4c6ff0eef1 Backport moby zfs changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 38e45fb8e2 Backport moby graphtest changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 98c480e157 Backport moby devmapper driver changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 4c17c25ee2 Backport moby btrfs driver changes to containers/storagea
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 2dce2c311f Backport moby aufs driver changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 57641cc0f9 Backport moby drivers general changes to containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 20:45:15 +00:00
Daniel J Walsh 04c9124148 Start using drivers.Options for passing date to graphdrivers
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-19 21:15:29 +00:00
Daniel J Walsh 9c85fa7013 Merge pull request #105 from rhatdan/master
Add interfaces that were removed from upstream but containers/image uses
2017-09-13 11:15:45 -04:00
Daniel J Walsh d3761825a9 Add interfaces that were removed from upstream but containers/image uses
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>
2017-09-13 14:30:53 +00:00
Nalin Dahyabhai 0b8ce12dc7 Merge pull request #103 from nalind/store-names
Fix a locking error in Store.Names()
2017-09-12 17:59:17 -04:00
Nalin Dahyabhai 681e0e8d18 Update searching of read-only stores
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>
2017-09-12 17:38:09 -04:00
Nalin Dahyabhai 6ca203850d Add a note about deduplication in SetNames()
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>
2017-09-12 17:26:19 -04:00
Nalin Dahyabhai 63c2227dd7 Teach Store.Lookup() about read-only stores
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>
2017-09-12 17:26:19 -04:00
Nalin Dahyabhai 50a2d28674 Fix a locking error in Store.Names()
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>
2017-09-12 17:26:19 -04:00
Daniel J Walsh e3e3387904 Merge pull request #100 from rhatdan/master
Update packages to match latest code in moby/pkg
2017-09-12 15:30:13 -04:00
Daniel J Walsh f39066fe1b Update packages to match latest code in moby/pkg
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>
2017-09-12 18:00:29 +00:00
Daniel J Walsh 336b249d83 Merge pull request #95 from rhatdan/runroot
Revert "RunRoot directory should be mounted private"
2017-09-11 16:01:17 -04:00
Daniel J Walsh b4b03f3e95 Revert "RunRoot directory should be mounted private"
This reverts commit 05e45e0b08.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-11 19:41:23 +00:00
Daniel J Walsh 5758798a41 Merge pull request #99 from rhatdan/master
Vendor in latest golang.org/x/sys
2017-09-08 07:20:34 -04:00
Daniel J Walsh b3bf8e33e1 Vendor in latest packages for updating storage driver
updating
golang.org/x/sys 07c182904dbd53199946ba614a412c61d3c548f5

Adding
github.com/stretchr/testify 4d4bfba8f1d1027c4fdbe371823030df51419987
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76
github.com/pmezard/go-difflib v1.0.0

Removing
github.com/vdemeester/shakers
github.com/go-check/check

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-08 07:07:48 -04:00