-
Notifications
You must be signed in to change notification settings - Fork 3k
libpod/Container.readFromJournal(): don't skip the first entry #11263
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
|
LGTM I have changed my opinion also since the meeting. I think that #10653 would actually pass when using c/common v0.43.2. |
|
Hmm, when I run tests manually in my VM, some of them are still failing. This might require some tweaking yet. |
|
@nalind, could you pick up https://github.com/containers/podman/pull/10653/files and bump c/common? |
Oof, that wasn't with this PR, but it looked better locally once I'd checked out the pull request.
Okay, I think that's in here now. |
vrothberg
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.
LGTM
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
That extra blank entry that #10653 is adding when each container starts seems to be in conflict here. |
1c718f6 to
0a04558
Compare
|
Let's see what happens when we make that first entry a "history" event. |
|
One failure looks like a potential network flake |
|
My test system had |
|
This is a real error caused by the new c/common: |
Oh, I don't think we're supposed to be able to "tag" images with names that don't include tags (a.k.a. tagged references). I wrote that test, so I guess it's fitting that I get to fix it. |
|
LGTM once the flake bit is hunted down. |
vrothberg
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.
|
The failure in the system tests seems consistent but only on
Not sure what to do other than rebasing and trying again? |
|
Rebased. |
[NO TESTS NEEDED] Since we are just testing the default. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
When reading log entries from the journal, don't skip past the first matching entry after we've positioned the cursor at it. Make the first blank-line entry that we logged so that the container would always have at least one log entry for us to find (until it gets vacuumed out, at least) a fake history entry, so that `logs` doesn't pass it on for display. CI already has tests that exercise journal-based logging, so [NO TESTS NEEDED] Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Update github.com/containers/common from 0.43.0 to 0.43.2. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
In these tests, don't try to tag an image using a canonical ("with
digest") image name.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
In libpod/logs.LogLine.Write(), don't write a newline to stdout/stderr when the log message is only part of a line. In libpod.ConmonOCIRuntime.HTTPAttach(), don't send a newline over the HTTP connection when the log message is only part of a line. In pkg/api/handlers/compat.LogsFromContainer(), don't send a newline over the HTTP connection when the log message is only part of a line, and don't make doing so conditional on whether or not the client used the docker or podman endpoint. In pkg/domain/infra/tunnel.ContainerEngine.ContainerLogs(), don't add our own newline to log messages, since they already come through from the server when they need to. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Increase the amount of time we're willing to wait for a log message that a container should be printing to show up in the output of `logs -f`, since on at least one CI configuration we're seeing a turnaround as high as 46s, but it's not something we can directly control, so that's not a hard maximum. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
|
The |
vrothberg
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.
LGTM
@containers/podman-maintainers PTAL on the new changes.
|
@Luap99 PTAL |
|
Note: once merged, we can close #10587 |
| // Log lines in the compat layer require adding EOL | ||
| // https://github.com/containers/podman/issues/8058 | ||
| if !utils.IsLibpodRequest(r) { | ||
| if !line.Partial() { |
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.
Does this match docker?
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.
We use the same handler for both types of clients, so this makes both behave the same. Anecdotally, when I pointed a docker client at the podman socket, I get what looks like the correct behavior on the client end.
|
This is a breaking change for API users. Therefore this should not be backported to any 3.X branches. I am fine to merge this since we are on 4.0 on main but this should be documented somewhere. |
Unless it's a bug fix :) Let's explore what Docker does. |
The log change is not really a bug fix. The new lines are now added on the server side and not on the client side for the libpod endpoint. Therefore this is breaking libpod api users. |
ashley-cui
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.
/lgtm
When reading log entries from the journal, don't skip past the first matching entry after we've positioned the cursor at it.
Fixes #11253.