Commit Graph

5598 Commits

Author SHA1 Message Date
Daniel J Walsh ff125a5657
Move storage options to driver specific entries
Storage options are really driver specific and it is when distributions set
defaults, they should not effect the user if he changes the default driver.

By moving the storage options to be driver specific, we can make sure all
drivers only document and support their options.

With this patch we will continue to support the global mountopt but the driver
specific version will override the global mountopt.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-10-11 16:26:42 -04:00
Giuseppe Scrivano 37930824fb
config: drop skip_mount_home
it was needed only with OSTree to allow hard links.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-05 20:27:46 +02:00
Giuseppe Scrivano 7a0d58dab5
storage: drop ostree deduplication
it was an attempt to use OSTree to deduplicate files, at the time we
already had a dependency on OSTree for system containers in
containers/image.  Since the feature never really took off, let's just
drop it.

Closes: https://github.com/containers/storage/issues/419

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-05 20:27:45 +02:00
Daniel J Walsh fa580f0747
Add support for ignoreChownErrors to vfs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-29 14:30:17 -04:00
Daniel J Walsh 976fe22092
Add storage options to IgnoreChownErrors
Modified patch of Kevin Pelzel.

Also changed ApplyDiff to take new ApplyDiffOpts Struct.

Signed-off-by: Kevin Pelzel <kevinpelzel22@gmail.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-26 06:05:27 -04:00
Daniel J Walsh 7bc20b6744
Add support for installing man pages
We want to create a containers-storage package which can install the man pages.
This package will be pulled in via containers-common.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-21 04:34:04 -04:00
Sascha Grunert 66c879f02a
Switch to golangci-lint
This commit uses internal tools vendoring to switch to golangci-lint. All
working linters have been enabled. The other tools have been vendored as
well into the same tools folder, whereas the corresponding test and
build targets have been adapted as well.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-07-17 11:13:06 +02:00
Cleber Rosa caa22c368e Use same variable name on both commands
On the relabeling instructions, it's quite confusing to use a variable
on the first command, and then a literal location on the second one.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
2019-07-05 11:39:06 -04:00
Silvano Cirujano Cuesta 8aff2c5797 doc: fix manpage for containers-storage.conf
Fix the sections and their titles in the manpage for containers-storage.conf.
Section titles are all capitalized and don't end with a period.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
2019-05-04 21:17:55 +02:00
Silvano Cirujano Cuesta 0494196eed docs: sort configuration options alphabetically
Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
2019-05-04 16:21:44 +02:00
Silvano Cirujano Cuesta bd33b0fabb docs: fix manpage for containers-storage.conf
Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
2019-05-04 16:19:47 +02:00
Silvano Cirujano Cuesta 4072df6f8d docs: add manpage for import-layer
Add the missing manpage for the subcommand import-layer.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
2019-05-03 16:18:29 +02:00
Silvano Cirujano Cuesta dfa0a6c414 docs: document OSTree file deduplication
Add to the main manpage the reference to the fact that OSTree will be
used for file deduplication on readonly layers if:
* ostree_repo configured,
* containters-storage build with support for OSTree

That information was missing throughout all the documentation.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
2019-05-03 16:18:29 +02:00
Daniel J Walsh 5fa856aeb2
Add missing options to man page for containers-storage
We were not documenting remap-uid and gid, need this documented in the man
pages.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-02 09:11:14 -04:00
Silvano Cirujano Cuesta 35217acd13 docs: add special handling for manpages in sect 5
The manpage of the configuration goes to section 5 instead of 1, like
most of the other manpages. Therefore the existing code wasn't handling
the manpage for 'containers-storage.conf' not appropriately.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
2019-04-26 12:27:43 +02:00
Silvano Cirujano Cuesta a012fb5de7 docs: fix manpage for configuration file
Manpage for storage.conf is being built as 'container-storage.conf.5'
(notice the missing 's' after 'container'), but it should be
'containers-storage.conf.5' for consistency with the whole project
naming.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
2019-04-26 09:36:33 +02:00
Daniel J Walsh a7b44569b1
Add FILES section to containers-storage.5 man page
This helps users figure out where the configuration files are located
and understand how to override them.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-29 09:43:03 -04:00
Daniel J Walsh d26e590389
Add documentation about SELinux labeling
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-08 04:24:18 -05:00
Nalin Dahyabhai ccf8bef6fa Teach images to hold multiple manifests
Change how we compute digests for BigData items with names that start
with "manifest" so that we use the image library's manifest.Digest()
function, which knows how to preprocess schema1 manifests to get the
right value, instead of just trying to finesse it.

Track the digests of multiple manifest-named items for images.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-02-07 10:27:36 -05:00
Nalin Dahyabhai bd6cac944a Remove the last traces of the "override_kernel_check" option
The logic that depended on override_kernel_check was changed to test for
the feature at runtime, so we don't need to be suggesting to people that
they need to set this option, or that the option is even a thing.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-01-16 16:59:39 -05:00
Daniel J Walsh c3682b38d3
Merge pull request #242 from eramoto/add-mounted-manpage
[docs] Add man-page of subcommand mounted
2018-12-05 10:19:18 -05:00
Matthew Heon 9e31fbd49d Add list of supported graph drivers to manpage
People looking to modify storage.conf might be confused as to
what the valid graph drivers and their names are. List all
supported drivers in the manpage to assist them.

Shouldn't be necessary elsewhere, most of the other fields are
just paths.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-12-04 16:06:13 -05:00
ERAMOTO Masaya 610e74a199 Add man-page of subcommand mounted
Add a man-page of subcommand mounted that is added by commit 1075a73cac.
Add new lines to prevent the section SUB-COMMANDS of containers-storage.md
from crushing when previews as markdown.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2018-11-20 12:35:51 +09:00
Daniel J Walsh 8b1a0f8d68
Add default mount options to pass to drivers
I believe we should be running container images mounted with nodev by default.
This would eliminate the disk of a device sneaking into the container without
being on the approved list.  This would give us the same or potentially additional
security over the device cgroup.

It would be nice if this could be passed in on an image by image basis.  So users
could also specify if they want nosuid images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-07-18 10:20:27 -04:00
Giuseppe Scrivano e933db5962
storage: rename fuse_program to mount_program
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-16 17:20:55 +02:00
Giuseppe Scrivano 759aab13f0
storage: allow to override .fuse_program from the conf file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-16 17:16:32 +02:00
Giuseppe Scrivano f3e7ee3c2a
configuration: new option skip_mount_home
It is needed to use an OSTree repository (either directly or as a parent
repository) that is not under the storage home directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-29 18:47:10 +02:00
Giuseppe Scrivano 0c7cb6041a
overlay: new option to support ostree deduplication
usage example:

skopeo copy docker-daemon:busybox:latest containers-storage:\[overlay2@/var/lib/containers/storage+/var/run/containers/storage:overlay2.ostree_repo=/var/lib/containers/storage/overlay2/ostree/.repo,overlay2.override_kernel_check=1\]\busybox

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-29 18:47:10 +02:00
Giuseppe Scrivano fc4b8629c6
containers-storage: add new option .fuse_program
When specified the mount of the overlay file system is delegated to
the specified command instead of mounting it directly.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-29 09:13:49 +02:00
Daniel J Walsh 939bd74869 Fix up containers-storage.conf man page for devicemapper options
Need to document the devicemapper changes.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-05-22 12:50:28 -04:00
Nalin Dahyabhai b22d9f20d3 Exercise Copy[File]WithTar, optionally with Chown flags
Add integration tests to exercise CopyFileWithTar and CopyWithTar, both
with and without Chown flags.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2018-05-01 10:27:34 -04:00
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
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
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
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 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
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 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 896140a8c3 Rename storage.conf.5.md to containers-storage.conf.5.md
We have a conflict on man pages storage.conf man page is owned
by the inn package, so we need to pick a less generic name.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-08-29 14:11:48 -04:00
Nalin Dahyabhai 2036680a3a Finish renaming oci-storage to containers-storage
Update the rest of the documentation, scripts, and output.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-10 16:11:09 -04:00
Nalin Dahyabhai fb0b0e7cfe Make Diff() methods take an optional *DiffOptions
Add an optional *DiffOptions parameter to Diff() methods (which can be
nil), to allow overriding of default behaviors.

At this time, that's just what type of compression is applied, if we
want something other than what was recorded when the diff was applied,
but we can add more later if needed.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-06-16 10:50:08 -04:00
Nalin Dahyabhai 77ad6176a9 Rename CLI from oci-storage to containers-storage
Rename the CLI tool to match the name that we gave the transport that
uses it in containers/image, which affects just about every consumer of
this library.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-05-25 15:50:33 -04:00
Dan Walsh 119beac58d Add support for a toml config file
Container Storage is going to be shared by multiple tools.  Therefore
we don't want each one of these tools setting up its own container
storage.  This storage config can be shared between multiple users.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-05-24 15:14:38 -04:00
Nalin Dahyabhai b046fb5a9a Add a Shutdown() method to the Store
Add a method for calling the underlying driver's Cleanup() method,
preferably when it's not going to disrupt another user of the same data
store, and try to give other users of the store a way to notice that the
driver's been cleaned up, so they need to reinitialize things before
continuing to use them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-10-26 17:04:47 -04:00
Nalin Dahyabhai 321373adb4 Add GetContainerDirectory/GetContainerRunDirectory
Add GetContainerDirectory and GetContainerRunDirectory methods to the
store, for getting the location of a directory in which the caller can
manage data directly.

This breaks the general model of keeping the library's caller from
having to bother with where things are stored once the library is
initialized, but is added so that ocid won't have to manage the
directory in which it's dropping files to be picked up by other
binaries, in particular configuration files that it's leaving for runc.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-09-23 14:24:22 -04:00
Nalin Dahyabhai b1e8a830eb Fix typos in oci-storage(1)
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-09-20 10:16:28 -04:00
Nalin Dahyabhai c9962555a7 Add some manuals
Add first draft of man pages for the CLI's various subcommands.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-24 17:59:34 -04:00
Nalin Dahyabhai ba24f4fa4c Remove more code
Based on a patch by Grant Seltzer <grantseltzer@gmail.com>

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:49 -04:00