Commit Graph

28921 Commits

Author SHA1 Message Date
Nalin Dahyabhai d10c03bc3d Extend driver.ListLayers()
Implement ListLayers() for the aufs, btrfs, and devicemapper drivers,
along with a unit test for them.
Stop filtering out directories with names that aren't 64-hex chars in
vfs and overlay ListLayers() implementations, which is more a convention
than a hard rule.
Have layerStore.Wipe() try to remove remaining listed layers after it
removes the layers that the layerStore knew of.
Close() a dangling ReadCloser in NaiveCreateFromTemplate.
Switch from using plain defer to using t.Cleanup() to handle deleting
layers that tests create, have the addManyLayers() test function do so
as well.
Remove vfs.CopyDir, which near as I can tell isn't referenced anywhere.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-04-12 16:05:09 -04:00
flouthoc 4cc5edf4f2
Merge pull request #1564 from giuseppe/fix-ownership-diff-dir
drivers: chown root mount to root in the userns
2023-04-12 20:28:53 +05:30
Daniel J Walsh b2ea3a8420
Merge pull request #1565 from containers/renovate/github.com-opencontainers-runc-1.x
fix(deps): update module github.com/opencontainers/runc to v1.1.6
2023-04-12 08:03:00 -04:00
renovate[bot] 206ebd268d
fix(deps): update module github.com/opencontainers/runc to v1.1.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-12 06:59:28 +00:00
Giuseppe Scrivano 7113c3d0ae
drivers: chown root mount to root in the userns
chown the root mount to root in the userns so that it can be used by
the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-11 12:56:23 +02:00
flouthoc 6e387ad2a2
Merge pull request #1562 from nalind/helper-unshare
Test helper: add "unshare"/"create-storage-layer"/"storage-layers"
2023-04-11 13:20:56 +05:30
Nalin Dahyabhai 3007ac6efb Test helper: add "unshare"/"create-storage-layer"/"storage-layers"
Add "unshare", "create-storage-layer", and "storage-layers" commands to
the test helper, along with a "-U" flag to have it unshare when handling
a given command.

Add "-o" as an alias for the "--owner" flag to "copy".

Add "-r" as an alias for the "--ro" flag to "mount".

Add a "-q" flag to "layers" so that we can list just the IDs.

Drop mention of a couple of not-implemented options from
docs/containers-storage-create-layer.md.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-04-10 10:23:23 -04:00
Daniel J Walsh 9d49da5f09
Merge pull request #1555 from rhatdan/main
Bump to v1.46.1
2023-04-07 23:08:08 -04:00
Daniel J Walsh 7b004b6033
Move to v0.47.0-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-07 23:07:04 -04:00
Daniel J Walsh d024c08773
Bump to v1.46.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-07 23:06:35 -04:00
Daniel J Walsh a7f37ce7d7
Merge pull request #1560 from nalind/pullup-2
"pull up" images when creating them, too
2023-04-07 23:00:33 -04:00
Nalin Dahyabhai b0c1c886c3 "pull up" images when creating them, too
We previously started "pulling up" images when we changed their names,
and started denying the presence of images in read-only stores which
shared their ID with an image in the read-write store, so that it would
be possible to "remove" names from an image in read-only storage.  We
forgot about the Flags field, so start pulling that up, too.

Do all of the above when we're asked to create an image, since denying
the presence of images with the same ID in read-only stores would
prevent us from finding the image by any of the names that it "had" just
a moment before we created the new record.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-04-06 18:21:11 -04:00
Daniel J Walsh 945f872fde
Merge pull request #1554 from n1hility/update-atomicwriter
Improve AtomicFileWriter's support for Win and Mac
2023-04-06 07:43:44 -04:00
Daniel J Walsh 8d58bbbe06
Merge pull request #1556 from containers/dependabot/go_modules/github.com/klauspost/compress-1.16.4
build(deps): bump github.com/klauspost/compress from 1.16.3 to 1.16.4
2023-04-05 16:09:36 -04:00
Daniel J Walsh 9d9b53ae89
Merge pull request #1559 from containers/renovate/major-ci-vm-image
chore(deps): update dependency containers/automation_images to v20230405
2023-04-05 16:09:10 -04:00
renovate[bot] 117653fac4
chore(deps): update dependency containers/automation_images to v20230405
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-05 19:39:01 +00:00
dependabot[bot] 990f892525
build(deps): bump github.com/klauspost/compress from 1.16.3 to 1.16.4
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.16.3 to 1.16.4.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.16.3...v1.16.4)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-05 11:57:39 +00:00
Jason T. Greene 21ec71c4ce Improve AtomicFileWriter's support for Win and Mac
Add ExplicitCommit option to provide calling code the ability to
preserve original files when an application error occurs, not just
an error that occurs during writing.

Change Close() impl to safely handle redundant calls (for defer
usage safety)

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-04-05 01:15:42 -05:00
Daniel J Walsh 6d0dc04160
Merge pull request #1553 from rhatdan/VENDOR
Bump to v1.46.0
2023-04-04 15:08:34 -04:00
Daniel J Walsh 775034c102
Move to v1.46.1-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-04 15:07:38 -04:00
Daniel J Walsh 7b706ff9e2
Bump to v1.46.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-04 15:07:38 -04:00
Daniel J Walsh 9904fa3ea7
Merge pull request #1535 from cevich/debian_images
Cirrus: Migrate Ubuntu to Debian CI VM Images
2023-04-04 15:04:38 -04:00
Daniel J Walsh 7aa4dc0ce6
Merge pull request #1552 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.7.0
2023-04-04 15:03:58 -04:00
Daniel J Walsh b649d7f9a7
Merge pull request #1551 from giuseppe/idmap-no-mount-program
overlay: disable native idmap with mount-program
2023-04-04 15:03:20 -04:00
Chris Evich 224f0b93d2
Fix datasets held open after tests
Fix for post-testing error:

`cannot destroy 'tmp.uwIwWzoNp4/tmp': dataset is busy`

Thanks to @nalind for the fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-04 14:20:46 -04:00
renovate[bot] 4a1bbab07f
fix(deps): update module golang.org/x/sys to v0.7.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-04 16:23:54 +00:00
Daniel J Walsh fab09d76d6
Merge pull request #1522 from rhatdan/VENDOR
Move to golang 1.18 and later
2023-04-04 12:22:18 -04:00
Chris Evich 1ad45ee2e2
Cirrus: Migrate Ubuntu to Debian CI VM Images
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-04 10:49:27 -04:00
Giuseppe Scrivano a2c6ee4585
overlay: disable native idmap with mount-program
never create the native idmap mount when a mount program is used.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-04 11:17:58 +02:00
Giuseppe Scrivano b04c26be94
Merge pull request #1550 from nalind/nameLooksLikeID
Drop nameLooksLikeID()
2023-04-04 10:16:00 +02:00
Daniel J Walsh a3204cf7e8
Move to golang 1.18 and later
Github.com is reporting security issues on older versions of
golang.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-03 15:26:54 -04:00
Nalin Dahyabhai f3808272d8 Drop nameLooksLikeID()
Replace the newer nameLooksLikeID() function with calls to
stringid.Validate(), which does the same thing.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-04-03 10:21:35 -04:00
Giuseppe Scrivano 0f3b7423dc
Merge pull request #1548 from nalind/graphtest-quota-put
DriverTestSetQuota: Put() after Get()
2023-04-03 09:03:49 +02:00
Daniel J Walsh 27c5c9a8e0
Merge pull request #1543 from containers/renovate/go-github.com/opencontainers/runc-vulnerability
fix(deps): update module github.com/opencontainers/runc to v1.1.5 [security]
2023-04-01 12:17:15 -04:00
renovate[bot] fc4f7008b6
fix(deps): update module github.com/opencontainers/runc to v1.1.5 [security]
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-01 11:45:57 -04:00
Daniel J Walsh 65e99dd9eb
Merge pull request #1547 from giuseppe/make-unsupported-fs-a-debug-msg
overlay: change error to debug log for unsupported fs
2023-04-01 11:43:17 -04:00
Miloslav Trmač cf7f1eccdf
Merge pull request #1483 from nalind/pullup-images
Complete "pulling up" of images in updateNames()
2023-04-01 10:57:07 +02:00
Nalin Dahyabhai 88be36b839 DriverTestSetQuota: Put() after Get()
Convention for tests is that they Put() any layers they Get().  Fix this
omission in DriverTestSetQuota() and change the layer name from
"zfsTest" to "quotaTest", because we have quota support on more than
just zfs.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-03-31 13:58:24 -04:00
Giuseppe Scrivano 7573007d6e
Revert "drivers/overlay: Notify the user if the backing filesystem is not supported with OverlayFS"
This reverts commit d9da33511d.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-31 19:45:27 +02:00
Nalin Dahyabhai 0f2bccfa56 Complete "pulling up" of images in updateNames()
When updateNames() copies an image's record from a read-only store into
the read-write store, copy the accompanying data as well.

Add fields for setting data items at creation-time to LayerOptions,
ImageOptions, and ContainerOptions to make this easier for us and our
consumers.

Replace the store-specific Create() (and the one CreateWithFlags() and
Put()) with private create() and put() methods, since they're not
intended for consumption outside of this package, and add Flags to the
options structures we pass into those methods.  In create() methods,
make copies of those passed-in options structures before modifying any
of their contents.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-03-31 10:36:30 -04:00
Daniel J Walsh 1da746e63e
Merge pull request #1544 from rhatdan/man
[CI:DOCS] Document transient_store in man page
2023-03-31 06:26:06 -04:00
Daniel J Walsh 57582350c7
Document transient_store in man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-31 05:36:06 -04:00
Daniel J Walsh 2944e89c82
Merge pull request #1545 from nalind/catch-overlay-zfs
supportsOverlay: ensure that whiteout creation works
2023-03-31 05:31:59 -04:00
Nalin Dahyabhai 53ed282125 supportsOverlay: ensure that whiteout creation works
In newer kernel versions, the kernel overlay driver will attempt to
atomically create whiteout when items are removed from merged
directories.
We need to be able to detect when the underlying filesystem isn't able
to do that at startup-time (in this case, zfs before its 2.2 release),
so that we don't end up thinking we're fine, but mounting writeable
layers which reject attempts to delete things.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-03-30 16:42:00 -04:00
Daniel J Walsh a5125db880
Merge pull request #1539 from containers/renovate/github.com-vbatts-tar-split-0.x
fix(deps): update module github.com/vbatts/tar-split to v0.11.3
2023-03-27 13:56:45 -04:00
renovate[bot] 31f1cef659
fix(deps): update module github.com/vbatts/tar-split to v0.11.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-26 06:40:07 -04:00
Daniel J Walsh b1216421c4
Merge pull request #1538 from distorhead/fix-non-cgo-build
fix(quota): added missed ClearQuota method to fix go-builds without cgo
2023-03-26 06:38:43 -04:00
Timofey Kirillov 5c184f399d
fix(quota): added missed ClearQuota method to fix go-builds without cgo
Fixed building of the containers/storage for linux without usage of CGO (tags="linux exclude_disk_quota" & CGO_ENABLED=0): added missing method for the stub Controller implementation.

Refs 891593970a.

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
2023-03-22 19:36:38 +03:00
Daniel J Walsh dd9d9de6d1
Merge pull request #1537 from containers/dependabot/go_modules/github.com/Microsoft/hcsshim-0.9.8
build(deps): bump github.com/Microsoft/hcsshim from 0.9.7 to 0.9.8
2023-03-18 06:44:08 -04:00
dependabot[bot] a71b4a9d0f
build(deps): bump github.com/Microsoft/hcsshim from 0.9.7 to 0.9.8
Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.9.7 to 0.9.8.
- [Release notes](https://github.com/Microsoft/hcsshim/releases)
- [Commits](https://github.com/Microsoft/hcsshim/compare/v0.9.7...v0.9.8)

---
updated-dependencies:
- dependency-name: github.com/Microsoft/hcsshim
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-16 08:26:53 -04:00