Commit Graph

5633 Commits

Author SHA1 Message Date
Nalin Dahyabhai 5e9e2ba6b3 Revert incorrect "heeded" -> "needed" typo fix
A recent typo fix introduced a typo.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2022-09-15 15:18:51 -04:00
Дилян Палаузов 2cfbc62474 docs/containers-storage.conf.5.md: reformat
Insisting on “DCO” imposes formalities, that serve self-purpose.  One cannot
assume that the submitter has time or will to read texts about symbolism in
software contributions.  If the system wants to see the text

  nrEAUIEUAIe eanuitdnuae EAIUEAUIAIE »ℓ§444.3.72b)°»°ℓ§euaieauuae

in each commit, people will write this, or any other text, that the system wants to
see.  All such text, which presence is mandated by the system, has the same value.

Signed-off-by: Дилян Палаузов <git-dpa@aegee.org>
2022-08-31 17:54:53 +03:00
Erik Sjölund cffa19709c fix typos and spelling
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-27 21:39:12 +02:00
Daniel J Walsh 84ab46a039
Move skip_mount_home to overlay specific flag in man page
Fixes: https://github.com/containers/storage/issues/1259

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-14 14:45:41 -04:00
Giuseppe Scrivano 268af00013
chunked: drop host dedup feature
drop host deduplication by just looking at the file path.  It could be
useful in very specific use cases, but it is too expensive for generic
images.  If the need arises, we first need to create an index of the
files that we can deduplicate so there is no need to calculate the
checksum on the fly.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-07 15:32:34 +02:00
Daniel J Walsh b64cfb4f49
Document the pull_options
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-18 15:21:03 -04:00
Daniel J Walsh 17fccdc2d8
Clearup inheritance rules for storage.conf
We have had cases where users assume that create a storage.conf file in
their home directory, will still inherit fields from the system
storage.conf files. Need to clear this up in the storage.conf file and
man page.

Fixes: https://github.com/containers/podman/issues/11778

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-03 08:30:26 -04:00
Daniel J Walsh 924c7975a7
Add data about relabeling homedir
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-18 15:26:46 -04:00
Daniel J Walsh 3c76f174dd
Tell users who change graphroot location to fix the SELinux labels
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-06 14:44:30 -04:00
Daniel J Walsh 5c30b53cf6
Fix handling of quota on volumes
This patch fixes the handling of inodes and sizes, currently if
user sets indoes and sizes together, quota is only set on sizes.

Second problem with quota is that we have to have unigue projectids
for each directory. Originally container/storage only did quota on
rootfs, now we want to support it on volumes as well. We need to be
able to get unigue projectids for these two different parent
directories. The added function, attempts to maintain at least 10,000
unigue id's based on the inode of the parent directory. I know that this
is not perfect and we have a potential for overlay.  If you have a
better algorythm, I would love to use it.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-30 05:56:23 -04:00
Daniel J Walsh c6905646a6
Update docs/containers-storage.conf.5.md
Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2021-07-26 10:01:33 -04:00
Daniel J Walsh 9b74ce657e
Update docs/containers-storage.conf.5.md
Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2021-07-26 10:01:12 -04:00
Daniel J Walsh 0c7d87718f
Add inode support to quota
quota for overlay also supports setting the maximum number of
inodes. OpenShift would like to be able to set this to control the
number of inodes added to an image or to a volume.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-26 06:29:40 -04:00
mla 74a61676d2 Added support for CONTAINERS_STORAGE_CONF override
Signed-off-by: Morten Larsen <mortenlarsens@gmail.com>
2021-06-09 10:17:09 +02:00
Daniel J Walsh f4e11b1cf6
Update docs/containers-storage.conf.5.md
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
2021-05-17 13:39:49 -04:00
Giuseppe Scrivano 7e665ab835
store: add option to disable volatile
add an option to storage.options to inhibit usage of the
volatile storage flag.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-05-17 09:51:52 +02:00
Jordan Williams 33418be0fc
Inherit system storage driver in rootless configurations
The storage driver set in `/etc/containers/storage.conf` was ignored for rootless configurations.
Rootless configurations would use overlay or vfs by default.
If the STORAGE_DRIVER environment was variable set, this value would be used instead.

This commit changes this behavior to inherit the driver set in `/etc/containers/storage.conf`.
To inherit the driver in rootless configurations, the driver must be valid in a rootless context.
The valid rootless drivers are btrfs, overlay, and vfs at this time.
To remain consistent with previous behavior, the STORAGE_DRIVER environment variable supersedes any driver set in `/etc/containers/storage.conf` and does not need to be a valid rootless driver.

buildah's documentation for the `--storage-driver` command will need to be updated to reflect these changes.
2021-03-02 10:28:53 -06:00
Giuseppe Scrivano 9cefbaec5f
containers-storage: support layer bigdata
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-02 11:39:03 +01:00
Daniel J Walsh fa5ff265b8
Switch references of /var/run -> /run
Systemd is now complaining or mentioning /var/run as a legacy directory.
It has been many years where /var/run is a symlink to /run on all
most distributions, make the change to the default.

Partial fix for https://github.com/containers/podman/issues/8369

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-18 06:32:45 -05:00
Daniel J Walsh ff80b0bc60
Log message when graphdriver is not set
Users expect the storage to handle the fact that the
driver field is not set, but this can lead to unexpected behaviour.

Caused me to spend several hours investigating an issue, where
the overlay options were not being used, because the user created
a storage.conf file without a graphdriver.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-04 16:24:49 -05:00
Daniel J Walsh a28fc545ba
Add more information on force_mask
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-13 12:39:32 -05:00
Giuseppe Scrivano cdb1fd70b2
storage: store original permissions mask if force_mask!=0
if force mask is configured, store the original permissions in the
'user.containers.override_stat` xattr.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-11 10:30:59 +01:00
Giuseppe Scrivano be5932a4d8
storage: add option force_mask=
force_mask sets a permission mask used for the new files and
directories.

It is useful for using a NFS share for the rootless storage.  It
requires this change in fuse-overlayfs:

https://github.com/containers/fuse-overlayfs/pull/246

[storage]
  driver = "overlay"
  graphroot = "/mnt/nfs/home/storage"
  [storage.options]
    size = ""
    mountopt = "xattr_permissions=2"
   [storage.options.overlay]
     force_mask = "0755"
     ignore_chown_errors = "true"

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-11 10:30:43 +01:00
Ashley Cui a5b66709f2 add note regarding problematic language in codebase
Containers storage is committed to inclusivity, a core value of open source. Historically, there have been technology terms that are problematic and divisive, and should be changed. We are currently taking time to audit our repository in order to eliminate such terminology, and replace it with more inclusive terms. We are starting where we can, with our own code, comments, and documentation. However, some of these terms are currently used within the Linux kernel and must be used as-is at this time. When the kernel maintainers rectify this usage, containers storage will follow suit immediately.
For more information: https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language?sc_cid=701600000011gf0AAA

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-09-30 15:40:17 -04:00
Daniel J Walsh e0baaad357
Fix problems found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 10:49:59 -04:00
Ashley Cui d974c2ba30 Allow any env variable for graphroot, runroot, storagepath
Previously only resticted to home, uid, and user

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-08-11 17:18:28 -04:00
Ashley Cui 69e1110322 Allow env variables in graphroot and runroot
Expand env variables in paths

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-08-06 11:59:28 -04:00
Daniel J Walsh f76d8a7277
Store the pvcreate --metadatasize option in storage.conf
As the number of devices increase the size of the metadata
needs to be modified.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-01 05:27:31 -04:00
Daniel J Walsh 0bfdcdb942
Add back skip_mount_home
Certain workloads, we would like to eliminate the mounting of containers-storage as private.
Running containers within containers for example.

This looks like it was accidently removed in the past, since there was still partial
implementation.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 05:14:12 -04:00
Giuseppe Scrivano 2cff5ddf93
userns: add support for auto
automatically pick an empty range and create an user namespace for the
container.

For root containers, it is necessary to specify an entry in
the /etc/subuid and /etc/subgid files to use for picking the range of
available IDs.  This is necessary to avoid collisions with IDs used
for rootless containers.  This setting is ignored for rootless
containers, since it is not possible to use arbitrary IDs, and the
initial set is always picked by the IDs assigned to the rootless
user.

When using auto userns, a container will use a range of IDs that is
not used by any other container user namespace, also those that are
not using auto userns, this is checked at creation time.
A successive container that doesn't use auto userns feature can still
collide with IDs used by an auto userns container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-03-26 11:12:34 +01:00
Giuseppe Scrivano 3cd5065405
store: change the default user to containers
change the default user used for root containers to lookup the id
ranges in /etc/sub*id to "containers".

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-03-24 18:27:13 +01:00
Giuseppe Scrivano 718e89d100
config: honor XDG_CONFIG_HOME
when the env variable is set, use its value for locating the user
configuration file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-03-13 17:02:33 +01:00
Daniel J Walsh e4f65e72d4 Add `rootless_storage_path` directive to storage.conf
This allows rootless admins to setup alternative
paths to content in the homedir.

Rootless users on NFS homedirs will not be allowed to run
podman, if an admin wants to setup alternative directory say
in /var/tmp on local storage, they could configure the storage.conf
file and then all users would automatically get storage in /var/tmp.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-02-24 14:40:03 -05:00
Daniel J Walsh 7e7e950036
Add better documentation for the mount_program in overlay driver
Currently users get an error message saying overlay is not supported on specific
drivers, but their is no information about the mount_program in the error
messages.  This PR adds a mention of this so that users can investigate the use
of the mount_program.

Also add information to the containers-storage.conf man page to document when
the mount_program is required to be used for an overlay driver.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-03 09:17:04 -05:00
Daniel J Walsh 31b1ca9b90
Overlayfs has dropped support for skip_mount_home options
Remove all references to the option in man pages in default configuration.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-03 19:02:22 +01:00
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