Skip to content

Enable HTTP debug and trace for transfer based puller #10762

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

Merged
merged 5 commits into from
Apr 24, 2025

Conversation

mxpv
Copy link
Member

@mxpv mxpv commented Oct 2, 2024

HTTP debug and traces are pretty useful for debugging interactions between containerd and remote registries. However in current implementation, those don't work with the new transfer service based puller/pusher. This PR updates remote resolver to enable it.

@mxpv
Copy link
Member Author

mxpv commented Oct 3, 2024

Added local streaming support as suggested by @dmcgowan PTAL.
This currently works only for HTTP debug. For HTTP trace, we need to update the log package to be able to log to an arbitrary io.Writer.

@mxpv
Copy link
Member Author

mxpv commented Oct 22, 2024

/test pull-containerd-node-e2e

@dmcgowan
Copy link
Member

This currently works only for HTTP debug. For HTTP trace, we need to update the log package to be able to log to an arbitrary io.Writer.

What does the tracing need to use log.G(ctx) at all?

I wonder if we need the debug/trace options at all. If the a debug stream is provided, can we just add the traces or is the format of the debug stream already defined?

I still don't like the client being able to force the daemon into a debug mode and utilizing the daemon's logs. I think we could have separate trace (maybe debug, but probably better just for client) config on the daemon side that could add the trace data to the daemon logs.

@mxpv
Copy link
Member Author

mxpv commented Oct 22, 2024

For traces, the format of the output is up to us as we implement trace hooks.

If the a debug stream is provided, can we just add the traces

Ya, technically we can write in any format as long as we write it to the stream's io.Writer. I use logger here as it was used in the original implementation, but nothing prevents us from writing in raw format similar to debug transport.

@dmcgowan dmcgowan added this to the 2.1 milestone Mar 6, 2025
@mxpv
Copy link
Member Author

mxpv commented Apr 22, 2025

/test pull-containerd-node-e2e

@github-project-automation github-project-automation bot moved this from Needs Reviewers to Review In Progress in Pull Request Review Apr 24, 2025
@samuelkarp
Copy link
Member

@mxpv Rebase?

mxpv added 3 commits April 23, 2025 17:38
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
@mxpv
Copy link
Member Author

mxpv commented Apr 24, 2025

Rebase?

@samuelkarp Done. But it now needs another LGTM

Reviews from dmcgowan and samuelkarp are stale because they were submitted before the most recent code changes.

@mxpv mxpv added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@dmcgowan dmcgowan added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@mxpv mxpv added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@dmcgowan dmcgowan added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@estesp estesp added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@mxpv mxpv added this pull request to the merge queue Apr 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 24, 2025
@dmcgowan dmcgowan added this pull request to the merge queue Apr 24, 2025
Merged via the queue into containerd:main with commit ae9b003 Apr 24, 2025
100 of 102 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Apr 24, 2025
@mxpv mxpv deleted the dbg branch April 24, 2025 17:06
@dmcgowan dmcgowan added the area/distribution Image Distribution label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

5 participants