Commit Graph

29965 Commits

Author SHA1 Message Date
Miloslav Trmač 74c273e30a Be clearer about the layer store locking rules
... as modified by https://github.com/containers/storage/pull/2036 .

Also document a LOCKING BUG I don't now care to fix.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-08-30 16:38:22 +02:00
openshift-merge-bot[bot] 8bc8379af2
Merge pull request #2077 from containers/renovate/major-ci-vm-image
chore(deps): update dependency containers/automation_images to v20240821
2024-08-29 10:34:27 +00:00
renovate[bot] 4591ffb1a7
chore(deps): update dependency containers/automation_images to v20240821
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 20:06:22 +00:00
openshift-merge-bot[bot] 20daaa6305
Merge pull request #2076 from cgwalters/sync-man-page-conf
Sync man page with storage.conf
2024-08-28 13:47:49 +00:00
Colin Walters 8f19c1693f Sync man page with storage.conf
xref https://github.com/containers/storage/pull/2065#issuecomment-2313002081

This does the same for the man page that I did for the default
storage.conf previously; instead of trying to squash all the
`pull_options` into a single option that we document "ad-hoc", make
it its own table just like the other sections.

- Add notes about "string bools" around relevant values.
- Avoid redundantly specifying the default; the default is the first
  thing we show after the `=`.

Synchronize the text between the man page and the default
`storage.conf`.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-27 14:41:22 -04:00
openshift-merge-bot[bot] 0540c85523
Merge pull request #2073 from containers/renovate/golangci-golangci-lint-1.x
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.3
2024-08-27 12:45:15 +00:00
renovate[bot] d8da7b377a
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-25 15:14:38 +00:00
openshift-merge-bot[bot] 2db1d730d0
Merge pull request #2072 from cgwalters/more-doc-composefs-zstd
docs: Fill in more about composefs and zstd:chunked
2024-08-25 15:13:52 +00:00
openshift-merge-bot[bot] 9a14315ced
Merge pull request #2074 from dfr/freebsd-exists
pkg/fileutils: fix Lexists on FreeBSD (second attempt)
2024-08-25 11:58:34 +00:00
Doug Rabson 7afe759198 pkg/fileutils: fix Lexists on FreeBSD (second attempt)
The previous attempt worked with 'podman image load' but not 'podman
image save' since the error returned from Lexists for non-existent files
was not recognized by os.IsNotExist. This version returns well-formed
errors for non-existent files and works with both 'podman image load'
and 'podman image save'.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2024-08-23 11:13:03 +01:00
Colin Walters 9a5c0986a4 docs: Fill in more about composefs and zstd:chunked
I've been reading more of the code and looking
at the filesystem in these modes.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-22 15:22:22 -04:00
openshift-merge-bot[bot] 4e18d1f7fa
Merge pull request #2071 from dfr/freebsd-exists
pkg/fileutils: fix Lexists on FreeBSD
2024-08-21 16:38:55 +00:00
Doug Rabson a603753982 pkg/fileutils: fix Lexists on FreeBSD
The faccessat system call does not support AT_SYMLINK_NOFOLLOW on
FreeBSD versions before 15.0. This works around the limitation by
falling back to os.Lstat if faccessat returns an EINVAL error.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2024-08-21 15:25:07 +01:00
openshift-merge-bot[bot] 7908bb8450
Merge pull request #2069 from giuseppe/composefs-do-not-make-mount-visible
composefs fixes
2024-08-21 12:39:37 +00:00
openshift-merge-bot[bot] 8ec73cadc7
Merge pull request #2070 from containers/renovate/golangci-golangci-lint-1.x
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.2
2024-08-21 10:35:51 +00:00
Giuseppe Scrivano 05df80ed37
overlay: use directly MkdirAllAndChownNew
use MkdirAllAndChownNew instead of checking for the directory
existence first and then create it if missing.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:43:25 +02:00
Giuseppe Scrivano 57a4177cf7
overlay: move check for mounted dir earlier
move the check for a previously mounted "merged" directory before
attempting any composefs mount.
It prevents mounting the composefs blobs to then throw them away as it
reuses the already existing mounted path when possible.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:49 +02:00
Giuseppe Scrivano f6ca3171c1
overlay, diff: do not make composefs mount visible
but access directly the files through the mount fd.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:48 +02:00
Giuseppe Scrivano 932bb5f629
overlay: split open mount and move mount
this is a preparation patch for the next commit

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:48 +02:00
Giuseppe Scrivano 689ee947fa
overlay: use Itoa instead of Sprintf("%d")
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-21 08:19:45 +02:00
renovate[bot] bff1751e59
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-20 21:54:50 +00:00
openshift-merge-bot[bot] e5de483a85
Merge pull request #2061 from Honny1/store-list-layers-images-containers
Create `Store.List` method for listing layers, images, containers
2024-08-20 21:54:06 +00:00
openshift-merge-bot[bot] 87436820a4
Merge pull request #2068 from containers/renovate/github.com-microsoft-hcsshim-0.x
fix(deps): update module github.com/microsoft/hcsshim to v0.12.6
2024-08-20 21:48:36 +00:00
renovate[bot] d4c302f9ba
fix(deps): update module github.com/microsoft/hcsshim to v0.12.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-20 00:29:44 +00:00
Daniel J Walsh f4fccb75fd
Merge pull request #2066 from cgwalters/toml-cleanup
storage.conf: Various cleanups
2024-08-19 11:43:18 -04:00
Jan Rodák b175ede0f9
Create newTestStore
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 15:25:58 +02:00
Jan Rodák 6d129bfe6d
Create test for store.List
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 15:25:41 +02:00
Jan Rodák 5f12aa1d3a
Create MultiList method for store
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 15:25:38 +02:00
openshift-merge-bot[bot] 2944d5b06e
Merge pull request #2064 from Honny1/golangci-lint-renovate
Prepare a golangci-lint installation for automatic update using renovate
2024-08-19 12:22:22 +00:00
Jan Rodák 52828e9aec
Prepare a golangci-lint installation for automatic update using renovate
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 11:14:21 +02:00
Colin Walters ed561808ab storage.conf: Various cleanups
The default storage.conf we ship is inconsistent in a few ways;
there's a lot of fixes rolled up into this single commit.

First: we were using a toml "inline table" for the pull options,
and then documenting each key in that table in one blob above.
It simply looks much nicer to use a non-inline table - then
we can move the docs next to each individual value. This is also
more consistent with other sections of the config.

I also thinned out a bit the doc comments; I think instead of trying
to have a longer explanation of zstd:chunked in the comments here
we should refer to the man page, which is a better place to have
details (and that we should fill out more).

Per another PR, I also stumbled across the fact that we have a
lot of "string bool" values and cannot be native TOML booleans. Document
that clearly next to each type.

We already have default values in the *code* for all
of these, so comment them all out to be consistent with other
values. (We're then getting closer to having the config file
be entirely comments, but that's a distinct project)

Finally, update the recent man pages I added to match
these changes.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-17 14:08:26 +00:00
openshift-merge-bot[bot] 8960db0702
Merge pull request #2063 from Honny1/fix-linter
Update golangci-lint
2024-08-16 12:57:14 +00:00
Jan Rodák 2a6a35821b
Fix linter: printf: non-constant format string in call (govet)
drivers/driver.go:499:18: printf: non-constant format string in call to github.com/sirupsen/logrus.Errorf (govet)
drivers/overlay/overlay.go:1495:44: printf: non-constant format string in call to (*github.com/sirupsen/logrus.Logger).Logf (govet)

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-16 12:22:22 +02:00
Jan Rodák 4f4c613f27
Update golangci-lint
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-16 12:22:19 +02:00
openshift-merge-bot[bot] 1c2a44f3f8
Merge pull request #2056 from giuseppe/fix-loopback-error
loopback: always return error if no loopback device
2024-08-13 10:37:58 +00:00
openshift-merge-bot[bot] d1b0a56e47
Merge pull request #2049 from cgwalters/unpack-via-fd
chrootarchive: Pass root via fd
2024-08-12 18:15:47 +00:00
Colin Walters d5fab15c83 chrootarchive: Add a const for tar options fd
Minor unrelated cleanup.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-12 09:47:00 -04:00
Colin Walters d7679480f6 chrootarchive(unix): Pass root via fd
I'd like to support passing a file descriptor root for the
container storage, and not an absolute path.

In the bootc codebase (partially a philosophy inherited
from ostree) we've heavily invested in fd-relative accesses,
primarily because it's common for us to operate in different
namespaces/roots, and fd-relative access avoids a lot of
possible footguns when dealing with absolute paths. It's
also more efficient, avoiding the need for the kernel to
traverse full paths a lot.

This is just one of a few preparatory changes necessary
in making it work to do:

`podman --root=/proc/self/fd/3 --runroot=... pull busybox`

That was breaking because the fd was being closed when forking
the child untar process here. Fix this by switching over
to always passing the root via fd on Unix.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-12 09:47:00 -04:00
openshift-merge-bot[bot] 2d106b0069
Merge pull request #2059 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.24.0
2024-08-09 10:46:08 +00:00
renovate[bot] dd5d449442
fix(deps): update module golang.org/x/sys to v0.24.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-08 21:55:36 +00:00
openshift-merge-bot[bot] ef73212088
Merge pull request #2058 from containers/renovate/github.com-moby-sys-user-0.x
fix(deps): update module github.com/moby/sys/user to v0.3.0
2024-08-08 15:19:58 +00:00
renovate[bot] cca07ca10e
fix(deps): update module github.com/moby/sys/user to v0.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-08 11:45:08 +00:00
openshift-merge-bot[bot] 6b538ae8e1
Merge pull request #2057 from giuseppe/compose-fs-use-new-mount-api
composefs use new mount api
2024-08-06 14:15:12 +00:00
Giuseppe Scrivano 1a6957bced
composefs: read errorfs from the mount fd
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-06 15:46:50 +02:00
Giuseppe Scrivano 4457fb6fe3
composefs: use new mount API
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-06 15:46:50 +02:00
Giuseppe Scrivano d31e825e20
loopback: always return error if no loopback device
simplify the error handling for openNextAvailableLoopback and avoid
named return values

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-08-06 12:36:55 +02:00
openshift-merge-bot[bot] b8f828d4a2
Merge pull request #2052 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.23.0
2024-08-05 14:02:22 +00:00
renovate[bot] 14dc942e2b
fix(deps): update module golang.org/x/sys to v0.23.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 13:01:37 +00:00
openshift-merge-bot[bot] 1ab5787884
Merge pull request #2054 from cgwalters/doc-composefs
docs: Add (not installed) man pages for composefs and zstd:chunked
2024-08-05 13:00:29 +00:00
Colin Walters 0b440b9b56 docs: Add (not installed) man pages for composefs and zstd:chunked
These aren't installed yet so they'll just live in the git repository
but hopefully we can expand them and use them as a central reference
point for "how do I do (zstd:chunked)|(composefs)". We have copies
of that kind of instruction in other downstream places but
I think here makes the most sense.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-04 17:21:04 -04:00