Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from containers:main #2

Merged
merged 1,431 commits into from
Jan 27, 2022
Merged

[pull] main from containers:main #2

merged 1,431 commits into from
Jan 27, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 11, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Jun 11, 2021
giuseppe and others added 29 commits August 17, 2021 09:32
enable partial pulls only when it is explicitely configured in the
storage.conf file:

[storage.options]

pull_options = {enable_partial_images = "true"}

This is to prevent the experimental feature to leak into CRI-O.

The default value will change in future once the feature is stable.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
chunked: allow to disable partial images feature
if the option use_hard_links is set:

[storage.options]
pull_options = {use_hard_links = "true"}

then attempt to deduplicate files using hard links first.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
If the underlying io.Reader implements WriteTo, make
the wrapped ReadCloser implement it as well.

This causes the values returned by pkg/archive.DecompressStream
to implement WriteTo (for gzip and zstd, not bzip2 and xz),
and that in turn eliminates a 32kB memory allocation when
decompressing layers during pull.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Have NewReadCloserWrapper pass through io.WriterTo
We will need ...Digest variables to hold the actual values.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Have one section deal with detecting compression and re-assembling
the original stream, and another with computing the length and digest
of the original stream.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
It is a tiny bit expensive, but most importantly
this moves the uses of {un,}compressedDigester so that
we can later make them optional.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Have it count the input to idLogger instead of uncompressedDigester;
they should get exactly the same data, but we are going to make
uncompressedDigester optional.

Also make the uncompressedDigester use a separate line so that we
can later change it more easily.

Should not change (observable) behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
For some reason, store.PutLayer does not pass _all_ of LayerOptions
to layerStore.Put; preserve that, but modify the code so that we
can pass more values in the future, without duplicating the logic.

Also deal with the local struct directly instead indirecting through
a pointer. (The compiler can probably optimize that to the same thing,
but having a non-pointer variable at least eliminates the analysis
to see if it can be nil.)

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This allows callers of Store.PutLayer to provide the values if
they have already computed them, so that ApplyDiff does not need
to compute them again.

This could quite significantly reduce CPU usage.

The code is a bit clumsy in the use of compressedWriter; it
might make sense to implement a ReadCounter counterpart to the
existing WriteCounter.

(Note that it remains the case that during pulls, both c/image/storage
and ApplyDiff decompress the stream; c/image/storage stores the
compressed, not the decompressed, version in a temporary file.
Nothing changes about that here - it's not obvious that changing it
is worth it, and anyway it's a different concept for a different
PR/discussion.)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
(go test .), with Go 1.17, crashes on macOS with something like
> === RUN   TestHistoryNames
> fatal error: unexpected signal during runtime execution
> [signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff203f1c9e]
>
> runtime stack:
> runtime: unexpected return pc for runtime.sigpanic called from 0x7fff203f1c9e
> stack: frame={sp:0x7ffeefbff7c8, fp:0x7ffeefbff818} stack=[0x7ffeefb80868,0x7ffeefbff8d0)

Fix this by updating golang.org/x/sys; see golang/go#45702
for details.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Add LayerOptions.OriginalDigest and LayerOptions.UncompressedDigest
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Commits](opencontainers/runc@v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/vbatts/tar-split](https://github.com/vbatts/tar-split) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/vbatts/tar-split/releases)
- [Commits](vbatts/tar-split@v0.11.1...v0.11.2)

---
updated-dependencies:
- dependency-name: github.com/vbatts/tar-split
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
….com/opencontainers/runc-1.0.2

build(deps): bump github.com/opencontainers/runc from 1.0.1 to 1.0.2
….com/vbatts/tar-split-0.11.2

build(deps): bump github.com/vbatts/tar-split from 0.11.1 to 0.11.2
chunked: add new pull options use_hard_links and enable_partial_images
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
in addition to zstd:chunked, add support for the estargz format.

estargz is maintained at github.com/containerd/stargz-snapshotter

Images using estargz can be used on old clients and registries that
have no support for the zstd compression algorithm.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.8.20 to 0.8.21.
- [Release notes](https://github.com/Microsoft/hcsshim/releases)
- [Commits](microsoft/hcsshim@v0.8.20...v0.8.21)

---
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>
….com/Microsoft/hcsshim-0.8.21

build(deps): bump github.com/Microsoft/hcsshim from 0.8.20 to 0.8.21
giuseppe and others added 29 commits January 17, 2022 16:16
This reverts commit a3abf19.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This reverts commit 7ac0e7b.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
revert usage of github.com/valyala/gozstd
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.3 to 1.1.0.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/master/CHANGELOG.md)
- [Commits](opencontainers/runc@v1.0.3...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.13.6 to 1.14.1.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](klauspost/compress@v1.13.6...v1.14.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
….com/opencontainers/runc-1.1.0

build(deps): bump github.com/opencontainers/runc from 1.0.3 to 1.1.0
….com/klauspost/compress-1.14.1

build(deps): bump github.com/klauspost/compress from 1.13.6 to 1.14.1
Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/Microsoft/hcsshim/releases)
- [Commits](microsoft/hcsshim@v0.9.1...v0.9.2)

---
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>
….com/Microsoft/hcsshim-0.9.2

build(deps): bump github.com/Microsoft/hcsshim from 0.9.1 to 0.9.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
A common error when dealing with corrupted images is

> error locating item named "manifest" for image with ID "...": file does not exist

In many cases, the process writing to the containers storage has been
killed while pulling, building or committing an image.  The best thing
to do in this case is to remove the image as it is not usable.

Add a note to the error to consider removing the image to resolve the
issue to guide the users a bit more.

Fixes: containers/podman/issues/12854
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
the tar format doesn't support sockets so avoid adding them to the tar
stream.

Closes: #1115

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
archive: skip adding sockets to the tarball
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
when the option ForceMask is in place and the file UID, GID and mode
are written to a xattr skip the lchown syscall.

[NO TESTS NEEDED] as it requires a setup with NFS.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
archive: skip lchown if force_mask is set
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Add flate back in, codespell was too agressive
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.14.1 to 1.14.2.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](klauspost/compress@v1.14.1...v1.14.2)

---
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>
….com/klauspost/compress-1.14.2

build(deps): bump github.com/klauspost/compress from 1.14.1 to 1.14.2
Bumps [github.com/containerd/stargz-snapshotter/estargz](https://github.com/containerd/stargz-snapshotter) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/containerd/stargz-snapshotter/releases)
- [Commits](containerd/stargz-snapshotter@v0.10.1...v0.11.0)

---
updated-dependencies:
- dependency-name: github.com/containerd/stargz-snapshotter/estargz
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
….com/containerd/stargz-snapshotter/estargz-0.11.0

build(deps): bump github.com/containerd/stargz-snapshotter/estargz from 0.10.1 to 0.11.0
@nalind nalind merged commit a719ec7 into nalind:main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.