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

[docker,podman] Collect container image layers #3797

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

TurboTurtle
Copy link
Member

Adds collection of container image layers for the docker and podman plugins via the history and tree subcommands repsectively.

Resolves: #3796


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

@TurboTurtle
Copy link
Member Author

TurboTurtle commented Oct 2, 2024

Opening this for now, but will hold on any other requests from #3796 before merging.

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3797
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link
Member

@jcastill jcastill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with podman in Fedora and RHEL, works perfectly.

@samuelkarp
Copy link
Contributor

We don't need to hold this open (we can do it in another PR), but we're interested in the image layer information from containerd as well.

@SergeyKanzhelev
Copy link

Maybe not resolve the ticket to wait for Containerd implementation? This PR says "Resolves: #3796" which will close the ticket once PR is merged

Adds collection of container image layers for the docker and podman
plugins via the `history` and `tree` subcommands repsectively.

Related: sosreport#3796

Signed-off-by: Jake Hunsaker <[email protected]>
@TurboTurtle
Copy link
Member Author

Dropped the resolves, was figuring we could get feedback for containerd during review but if we need to push that collection and these separately that's fine too.

@SergeyKanzhelev
Copy link

@samuelkarp does ctr supports something like this? What is the recommended way to collect this on Containerd?

@samuelkarp
Copy link
Contributor

We don't really have a high-level interface for this in ctr. Probably closest would be something like:

  • ctr images list - grab all refs (first column) and digests (second column)
  • ctr content get <digest> - for each digest
  • For any digest that was then either an index or manifest list, grab the subsequent manifest digests from there and ctr content get <digest> again for the actual manifest
  • If we also want the config, then ctr content get <digest> on the config digest. But configs can have private information in them (environment variables and command line, mostly).

@TurboTurtle
Copy link
Member Author

I don't have a ctr setup to test against myself at the moment, so I'm going to merge this as-is for podman and docker, and we can do a follow up for ctr later on. If you want to open a PR for that, great - if not then I'll find some time in the next 2 or so weeks to work it out.

@TurboTurtle TurboTurtle merged commit 58d7824 into sosreport:main Oct 16, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Include container image manifests and layers in sosreport
5 participants