openshift-merge-bot[bot]
39d469c34c
Merge pull request #2050 from giuseppe/composefs-reduce-unix-pkg-usage
...
composefs: prefer std library functions
2024-07-30 19:41:42 +00:00
Giuseppe Scrivano
39098fb973
composefs: prefer std library functions
...
avoid dealing directly with file descriptors but use the standard
library functions.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-30 18:14:45 +02:00
Giuseppe Scrivano
5bc4390aa1
composefs: do not pass "ro" as a mount option
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-30 18:10:29 +02:00
openshift-merge-bot[bot]
4ef3467d07
Merge pull request #2048 from cgwalters/more-cloexec
...
overlay,chunked: Add some more O_CLOEXEC
2024-07-29 15:53:25 +00:00
openshift-merge-bot[bot]
5f1419dec7
Merge pull request #2047 from giuseppe/idmap-improve-errors
...
idmap: improve error messages
2024-07-29 13:02:54 +00:00
Colin Walters
12363bda1b
overlay,chunked: Add some more O_CLOEXEC
...
Just some more missing `O_CLOEXEC` I noticed while reading
the code for unrelated reasons.
Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-29 08:42:39 -04:00
Giuseppe Scrivano
175c6e0745
idmap: improve error messages
...
add more context to errors returned by unix.* functions
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-29 10:18:49 +02:00
openshift-merge-bot[bot]
a85af63434
Merge pull request #2046 from TomSweeneyRedHat/dev/tsweeney/v1.55.0
...
Bump to c/storage v1.55.0, then v1.56.0-dev
2024-07-25 19:06:38 +00:00
tomsweeneyredhat
772cbab1ba
Bump to c/storage v1.56.0-dev
...
Return the main branch to the next dev version.
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-25 14:16:58 -04:00
tomsweeneyredhat
d46cc6ac59
Bump c/storage to v1.55.0
...
As the title says. This is in preparation for
Podman v5.2.0 and RHEL 9.6/10.0Beta
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-25 14:14:07 -04:00
openshift-merge-bot[bot]
b8142c470b
Merge pull request #2045 from containers/renovate/github.com-moby-sys-user-0.x
...
fix(deps): update module github.com/moby/sys/user to v0.2.0
2024-07-25 13:58:40 +00:00
renovate[bot]
0ef960ca69
fix(deps): update module github.com/moby/sys/user to v0.2.0
...
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-25 10:08:20 +00:00
openshift-merge-bot[bot]
86a0c42538
Merge pull request #2044 from giuseppe/improve-some-composefs-errors
...
overlay: improve some composefs errors
2024-07-24 15:03:47 +00:00
openshift-merge-bot[bot]
5806e1dce8
Merge pull request #2043 from cgwalters/errctx
...
Add some error context in Changes codepaths
2024-07-24 14:52:46 +00:00
Giuseppe Scrivano
26c520ecf3
overlay: improve some composefs errors
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-24 16:35:52 +02:00
Colin Walters
86d421dd9a
Add some error context in Changes codepaths
...
Motivated by https://github.com/containers/storage/issues/2042
where we just get a bare `invalid argument` out of the entire
storage stack.
My offhand guess skimming some of the code is by far
the most likely thing here is the raw `lgetxattr` call. It'd
be useful to know that for sure.
Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-24 10:12:47 -04:00
openshift-merge-bot[bot]
233a31574f
Merge pull request #2040 from containers/renovate/github.com-cyphar-filepath-securejoin-0.x
...
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.1
2024-07-24 09:16:33 +00:00
renovate[bot]
85aec7fd7c
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.1
...
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-23 18:15:14 +00:00
openshift-merge-bot[bot]
10cff2ab9e
Merge pull request #2039 from giuseppe/fix-loopback-race-condition
...
loopback: fix race condition opening loopback device
2024-07-23 18:14:32 +00:00
Giuseppe Scrivano
998e6d433d
loopback: treat ENXIO as ENOENT
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-23 19:43:19 +02:00
Giuseppe Scrivano
01c633e609
loopback: fix race condition opening loopback device
...
the loopback device file could be already used/removed by another
process. Since the process is inherently racy, just grab the next
available index and try again until it succeeds.
Closes: https://github.com/containers/storage/issues/2038
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-23 19:43:19 +02:00
Giuseppe Scrivano
b23e274b36
loopback: use fstat on the open file descriptor
...
move the stat call later after the file is already opened so it is
less vulnerable to the file being removed between the stat and the
open syscall.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-23 12:18:09 +02:00
openshift-merge-bot[bot]
1bf05dd5c1
Merge pull request #2036 from giuseppe/fix-race-condition-naive-diff
...
overlay: use private merged directory for AIS
2024-07-22 11:21:07 +00:00
openshift-merge-bot[bot]
6ddf982129
Merge pull request #2031 from giuseppe/chunked-cache-do-not-write-read-only
...
chunked: do not write cache file to RO store
2024-07-22 11:18:03 +00:00
openshift-merge-bot[bot]
8d26edea90
Merge pull request #2035 from mtrmac/wip
...
Ensure chunked TOC and tar-split metadata are consistent
2024-07-19 18:21:06 +00:00
Miloslav Trmač
2c4c5b8921
Document the TypeReg/TypeChunk storage format
...
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-07-18 23:36:57 +02:00
Miloslav Trmač
a1acfed89a
Ensure that the metadata in the TOC matches the tar-split
...
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-07-18 23:36:57 +02:00
Miloslav Trmač
9af9f5735e
Use realistic tar-split data in TestGenerateAndParseManifest
...
We are going to be checking its consistency with the TOC.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-07-18 23:36:57 +02:00
Miloslav Trmač
2ba2dd1689
Split NewFileMetadata from pkg/chunked/compressor
...
In addition to the existing use when creating a TOC from tar data,
we will also need it when parsing TOC and tar-split data.
Should not change behavior.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-07-18 23:36:57 +02:00
openshift-merge-bot[bot]
981169d708
Merge pull request #2034 from containers/renovate/github.com-moby-sys-mountinfo-0.x
...
fix(deps): update module github.com/moby/sys/mountinfo to v0.7.2
2024-07-18 17:23:39 +00:00
renovate[bot]
43e697352d
fix(deps): update module github.com/moby/sys/mountinfo to v0.7.2
...
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-18 15:26:16 +00:00
openshift-merge-bot[bot]
398fe57538
Merge pull request #2037 from giuseppe/fix-decoding-xattr
...
chunked, composefs: fix decoding of xattrs
2024-07-18 15:25:25 +00:00
Giuseppe Scrivano
831e4454a4
chunked, composefs: fix decoding of xattrs
...
the value of the xattrs is encoded in base64, so decode them before
passing the value to the mkcomposefs tool.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-18 16:53:11 +02:00
Giuseppe Scrivano
683e8065f7
overlay: use private merged directory
...
use a private "merged" directory when mounting from an additional
store.
Operations like "Diff()" and "Changes()" cause an implicit mount when
the naive differ is used.
The issue was not observed earlier because native overlay can achieve
these operations without using a mount.
Since these mounts are performed read-only, and overlay supports
multiple mounts using the same lowerdirs, use a private location for
the "merged" directory. The location is owned by the current
writeable store, that is locked for writing.
Closes: https://github.com/containers/storage/issues/2033
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-17 23:29:29 +02:00
Giuseppe Scrivano
2c117149dc
store: get exclusive access to store with Diff/Changes
...
when NaiveDiff is used, the Diff/Changes operations can trigger the
mount of the layer. Prevent that multiple processes step on each
other and one of them performs an unmount while the other one is still
accessing the mount.
Closes: https://github.com/containers/storage/issues/2033
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-17 22:12:30 +02:00
Giuseppe Scrivano
0af94a8437
store: change error to ErrStoreIsReadOnly
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-17 19:38:11 +02:00
openshift-merge-bot[bot]
82ac2b8008
Merge pull request #2029 from containers/renovate/github.com-microsoft-hcsshim-0.x
...
fix(deps): update module github.com/microsoft/hcsshim to v0.12.5
2024-07-17 12:02:10 +00:00
Giuseppe Scrivano
05334bc4cf
chunked: do not write cache file to RO store
...
if the layer is R/O, do not write a cache file.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-16 14:41:42 +02:00
renovate[bot]
2938f259df
fix(deps): update module github.com/microsoft/hcsshim to v0.12.5
...
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-15 20:39:33 +00:00
openshift-merge-bot[bot]
a9357dd79e
Merge pull request #2025 from giuseppe/fix-archive-filter-error-reporting
...
archive: improve filter error reporting
2024-07-15 20:39:04 +00:00
Giuseppe Scrivano
91f150f48b
archive: improve filter error reporting
...
follow-up for https://github.com/containers/storage/pull/2012
report the error as seen by the input stream, instead of attempting
another read.
Closes: https://github.com/containers/storage/issues/2022
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-15 22:08:05 +02:00
openshift-merge-bot[bot]
98ad80d6d1
Merge pull request #2012 from giuseppe/archive-filter-reports-error-from-read
...
archive: report error from input stream
2024-07-12 12:56:45 +00:00
openshift-merge-bot[bot]
ab74785ce9
Merge pull request #2021 from giuseppe/drop-modprobe
...
drivers: drop modprobe calls
2024-07-12 12:15:34 +00:00
Giuseppe Scrivano
0c6d09ddc1
drivers: drop modprobe calls
...
drop an expensive call to "modprobe" each time we initialize the
storage. The kernel already tries to automatically load the module if
needed, and still the user has the possibility to load the module
manually if required.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-12 13:30:17 +02:00
openshift-merge-bot[bot]
b7750dc177
Merge pull request #2013 from containers/renovate/github.com-cyphar-filepath-securejoin-0.x
...
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.0
2024-07-11 21:10:46 +00:00
Giuseppe Scrivano
22fa550864
archive: report error from input stream
...
if there is an error reading from the input stream, prefer to report
it instead of the error from the filter program itself.
We have a test in the buildah CI that expects the "no space left on
device" error that comes from the input stream, to avoid changing the
test, just fix it here.
Reported here: https://github.com/containers/buildah/pull/5585
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-11 22:04:08 +02:00
renovate[bot]
7e5a551596
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.0
...
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-11 16:07:02 +00:00
openshift-merge-bot[bot]
97d68135f3
Merge pull request #2011 from Honny1/enable-errcheck
...
Enable `errcheck` linter
2024-07-11 12:36:51 +00:00
Jan Rodák
c834df82d1
Enable errcheck
...
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-07-11 11:06:52 +02:00
openshift-merge-bot[bot]
573c558289
Merge pull request #2010 from mtrmac/warnings
...
Clean up some warnings
2024-07-10 22:19:26 +00:00