Commit Graph

26595 Commits

Author SHA1 Message Date
Daniel J Walsh a97b757f6a
Merge pull request #341 from nalind/layerless
CreateContainer: don't worry about mapping layers unless necessary
2019-05-08 14:21:07 -04:00
Nalin Dahyabhai 88afc63e89 CreateContainer: don't worry about mapping layers unless necessary
When creating a container, don't worry about whether or not the base
image's top layer has the right ID mappings in cases where the base
image doesn't have a top layer.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-05-07 16:21:04 -04:00
Nalin Dahyabhai 85c846a2bb tests: test layerless images
Test creation of images without layers, and containers based on them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-05-07 16:21:04 -04:00
Daniel J Walsh 09449630d3
Merge pull request #340 from Silvanoc/silvano/fix-manpage-containers-storage-conf
docs: fix manpage for containers-storage.conf
2019-05-05 07:10:49 -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
Daniel J Walsh a95f4e7d35
Merge pull request #339 from Silvanoc/silvano/document-readonly-layers
Document OSTree deduplication and add manpage for import-layer
2019-05-03 12:45:06 -04: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 94f0324a5d
Merge pull request #338 from rhatdan/version
Version 1.12.6 Bump
2019-05-02 13:51:20 -04:00
Daniel J Walsh 1247f6266c
Move to v1.12.7-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-02 12:54:51 -04:00
Daniel J Walsh eb8303b551
Bump to v1.12.6
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-02 12:54:47 -04:00
Daniel J Walsh 2488a2f70f
Merge pull request #337 from rhatdan/revert
Revert "Add MountTempFromSource and RemoveTemp interfaces"
2019-05-02 12:50:33 -04:00
Daniel J Walsh ef42340c2e
Revert "Add MountTempFromSource and RemoveTemp interfaces"
This reverts commit e9695564db.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-02 11:54:55 -04:00
Daniel J Walsh 91cf837e44
Merge branch 'master' of github.com:containers/storage 2019-05-02 10:36:36 -04:00
Daniel J Walsh 409dbaea65
Merge pull request #335 from rhatdan/man
Add missing options to man page for containers-storage
2019-05-02 10:31:21 -04: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
Daniel J Walsh a3454a8f23
Merge pull request #336 from nalind/compile-fix
Compilation fixes
2019-05-02 09:10:56 -04:00
Nalin Dahyabhai 8d7b848bcb Compilation fixes
Add a couple of quick compilation fixes.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-05-01 23:37:07 -04:00
Daniel J Walsh 346d481c10
Merge pull request #334 from giuseppe/fix-ownership-layers
layers: use the correct idmapping when creating a layer
2019-05-01 15:28:46 -04:00
Giuseppe Scrivano d1554f0dcd
overlay: use the layer idmapping if present
prefer the custom idmapping specified for the layer instead of using
the global one configured for the driver.

Closes: https://github.com/containers/libpod/issues/2960

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
2019-05-01 18:46:07 +02:00
Giuseppe Scrivano 7c6d502e9b
vfs: prefer layer custom idmappings
Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
2019-05-01 18:46:06 +02:00
Giuseppe Scrivano 77065edb97
layers: propagate down the idmapping settings
when creating a layer, propagate down the idmapping.

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
2019-05-01 18:31:19 +02:00
Daniel J Walsh 3d7a61daa2
Merge pull request #333 from umohnani8/symlinks
Fix up recreateSymlink
2019-04-30 10:48:13 -04:00
Urvashi Mohnani 2581a719d5 Fix up recreateSymlink
Noticed that the link directory may be lost also with the symlinks,
so this fix creates it if not found and then restores all the links.
Also fix up logic to check wether a dir is found or not instead of
a regular file.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2019-04-29 18:00:10 -04:00
Daniel J Walsh e9695564db
Add MountTempFromSource and RemoveTemp interfaces
These interfaces can be used to setup a graphdriver mountpoint
of the source directory for use within a container.
The RemoveTemp interface umounts the mountpoint and then removes
all of the modified data in the graphdriver for this source directory.

The primary use case of these interfaces is for container engines that
want to mount a directory from the host system into the container. The
source dirctory then can be modified without actually changing the
directory on the host.

Containers will use these interfaces for sharing packaing cache directories
like /var/cache/dnf, to help speed up container builds.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-29 14:46:40 -04:00
Valentin Rothberg e90620ceae
Merge pull request #330 from Silvanoc/silvano/fix-manpages-build
docs: fix manpage for configuration file
2019-04-26 13:02:19 +02: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 8a0ec061da
Merge pull request #328 from nalind/single-lower
overlay: fix single-lower test
2019-04-25 13:37:01 -04:00
Nalin Dahyabhai 42c08c2767 overlay: fix single-lower test
The multiple-lowers test in the overlay driver succeeded even when we
didn't pass in an upper or work directory, because it can be used for
read-only cases even then, but the single-lower test definitely needs us
to provide upper and work directories, so do that.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-04-25 12:52:50 -04:00
Daniel J Walsh 009a46f52c
Merge pull request #326 from umohnani8/symlinks
Recreate symlink when not found
2019-04-25 04:28:48 -04:00
Urvashi Mohnani 4906488081 Recreate symlink when not found
If the synlinks under /var/lib/containers/storage/overlay/l are lost
during a sudden reboot, we go through all the layers under the overlay
directory and create symlinks point to their respective diff directories
with the same name as they were created before. We get this name from
the "link" file under each layer dir.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2019-04-24 12:16:24 -04:00
Daniel J Walsh 83889dc0b1
Merge pull request #325 from rhatdan/version
Bump to 1.12.3
2019-04-23 14:30:45 -04:00
Daniel J Walsh 4f7791c15d
moved to 1.12.4-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-23 10:10:37 -04:00
Daniel J Walsh ac5dcba5f7
Bump to 1.12.3
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-23 10:09:28 -04:00
Daniel J Walsh 593f2796eb
Merge pull request #322 from giuseppe/rootless-uid-0
utils: root in a userns uses global conf file
2019-04-23 10:05:38 -04:00
Daniel J Walsh 3da0b926c7
Merge pull request #321 from rhatdan/stores
Fix handling of additional stores
2019-04-23 09:37:18 -04:00
Valentin Rothberg 7ae3e65a31
Merge pull request #324 from giuseppe/propagate-overlay-mount-errors
overlay: propagate errors from mountProgram
2019-04-23 15:35:16 +02:00
Giuseppe Scrivano 1336305582
overlay: propagate errors from mountProgram
propagate the mountProgram stderr output if the mount failed.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-23 15:25:47 +02:00
Giuseppe Scrivano 8d53d451cc
utils: root in a userns uses global conf file
If the root user created a new user namespace, it still has to use the
system configuration and storage.

Previously if root created a user namespace when missing
CAP_SYS_ADMIN, we would use the configuration file under
/root/.config/containers instead of /etc/containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-23 14:12:03 +02:00
Daniel J Walsh e3394b6beb
Fix handling of additional stores
When you build an image with a parent layer in read-only stores
and the new image in read/write stores, the first time you try
to create a container based on the image, it fails, since it
cannot find the image in the same store.

This patch looks not only in the same store, but all of the stores
available.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-19 04:36:07 -04:00
Nalin Dahyabhai 2f12336bf4
Merge pull request #314 from vrothberg/test-flake
lockfile: make tests deterministic
2019-04-18 13:42:55 -04:00
Daniel J Walsh c18c47dab6
Merge pull request #318 from rhatdan/symlink
Evaluate device path for lvm
2019-04-18 09:04:52 -04:00
Daniel J Walsh ef30c4a71a
Merge pull request #320 from rhatdan/perms
Correctly check permissions on rootless directory
2019-04-18 08:56:11 -04:00
Daniel J Walsh aba92c81f9
Correctly check permissions on rootless directory
We have not been checking the permissions on the rootless directory
this causes issues in tools trying to access the login directory
if XDG_RUNTIME_DIR is not set correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-17 10:22:48 -04:00
Valentin Rothberg a8f72ecbc2
Merge pull request #319 from saschagrunert/integer-overflow-fix
Fix possible integer overflow on 32bit builds
2019-04-17 09:01:40 +02:00
Sascha Grunert 92374afb8e
Fix possible integer overflow on 32bit builds
This commit fix a possible integer overflow during U/GID map parsing.
Casting a 32bit unsigned integer to the resulting IDMap will now be
guarded by a simple overflow check. This check does apply only to 32bit
target architectures.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-16 10:36:35 +02:00
Daniel J Walsh ab043e226b
Evaluate device path for lvm
We have a bug report where a user specified a symbolic link to storage
driver.  The issue is the physical device is not predictable but the link
is, so evaluating sym links makes the symlink path supportable.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-15 05:57:51 -04:00