-
Notifications
You must be signed in to change notification settings - Fork 395
Add debugging for manifests when uploading to destinations. #2713
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
Conversation
mtrmac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There already is
image/docker/docker_image_dest.go
Line 522 in 8d501c7
| err := fmt.Errorf("uploading manifest %s to %s: %w", tagOrDigest, d.ref.ref.Name(), rawErr) |
On success, it should be possible to read the uploaded manifest from the registry — due to the existence of digest references, the registry does not really have the option to modify the uploaded data.
(My basic concern is that this is fairly noisy… and potentially we might worry about escaping the data, e.g. if it included newlines.)
|
One option could be to use the trace level not debug to log this message. We don't make a lot of use of that in podman but I used that myself to trigger trace logging in netavark which dumps netlink message which was useful to me a few times. ( If escaping is a concern it could log with |
|
In our case here, the specific scenario we were debugging was not a failure scenario; skopeo/podman was uploading layers with a negative size value ( And as @Luap99 mentioned (and was exactly right about), this was with skopeo so I initially did Also agreed with escaping the data if we prefer; I originally did |
Signed-off-by: Robb Manes <rmanes@redhat.com>
010d400 to
c6254e7
Compare
|
Cast as |
|
This really should be |
mtrmac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, using the trace level makes sense to me. (Also #201 proposes to use trace level, so that would be consistent.)
| return nil, fmt.Errorf("committing the finished image: %w", err) | ||
| } | ||
|
|
||
| logrus.Debugf("Copied manifest(s): %q", string(copiedManifest)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be better handled by logging before the PutManifest call in copyMultipleImages; that should record the same data, and avoid logging the same manifest twice in single-architecture copy situations.
|
Hi, and thank you for your contribution! We’ve recently migrated this repository into a new monorepo: containers/container-libs along with other repositories As part of this migration, this repository is no longer accepting new Pull-Requests and therefore this Pull-Request is being closed. Thank you very much for your contribution. We would appreciate your continued help in migrating this PR to the new container-libs repository. Please let us know if you are facing any issues. You can read more about the migration and the reasoning behind it in our blog post: Upcoming migration of three containers repositories to monorepo. Thanks again for your work and for supporting the containers ecosystem! |
Add optional logging for printing outgoing manifests. This can greatly help in debugging anything that might alter a manifest either on wire or in the use case I just had, verifying a problem in local storage (verifying the outgoing manifests without having to watch pure HTTP calls, etc).