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

Tests: Check different log driver can work with podman logs #8096

Merged
merged 1 commit into from
Oct 25, 2020

Conversation

ypu
Copy link
Contributor

@ypu ypu commented Oct 21, 2020

Add a check step in podman run --log-driver test. Prefer to add it here as it already has a loop to cover all different drivers
in this test.

@@ -413,6 +413,16 @@ json-file | f
else
is "$output" "" "LogPath (driver=$driver)"
fi

run_podman ? logs myctr
Copy link
Member

Choose a reason for hiding this comment

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

Tab issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reminder. Updated.

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, ypu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 21, 2020
@ypu ypu force-pushed the log-driver-test branch from cd10336 to 27b05f4 Compare October 21, 2020 14:40

run_podman ? logs myctr
if [[ $driver != 'none' ]]; then
is "$output" "$msg" "check that podman logs works as expect"
Copy link
Member

Choose a reason for hiding this comment

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

nit, only if you need to make other changes:

Suggested change
is "$output" "$msg" "check that podman logs works as expect"
is "$output" "$msg" "check that podman logs works as expected"

run_podman ? logs myctr
if [[ $driver != 'none' ]]; then
is "$output" "$msg" "check that podman logs works as expect"
[[ $status == 0 ]]
Copy link
Member

Choose a reason for hiding this comment

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

The bats [[ usage is evil. Please do this instead:

if [[ $driver == 'none' ]]; then
    run_podman 125 logs myctr
   ...
else
    run_podman logs myctr
   ...
fi

Add a check step in podman run --log-driver test. Prefer to add
it here as it already has a loop to cover all different drivers
in this test.

Signed-off-by: Yiqiao Pu <[email protected]>
@ypu ypu force-pushed the log-driver-test branch from 27b05f4 to 8e66795 Compare October 22, 2020 06:39
@ypu
Copy link
Contributor Author

ypu commented Oct 22, 2020

Thanks @TomSweeneyRedHat and @edsantiago for your comments. Update the code, also fixed the check failed for --log-driver none in remote test.

@edsantiago
Copy link
Member

/lgtm

Thank you!

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2020
@openshift-merge-robot openshift-merge-robot merged commit bce8331 into containers:master Oct 25, 2020
edsantiago added a commit to edsantiago/libpod that referenced this pull request Dec 14, 2020
Followup to containers#8284, due to my not having noticed containers#8096.

RHEL gating tests are failing again due to rhbz#1895105, the
one where we can't run journalctl rootless on RHEL. containers#8284 fixed
this for some RHEL builds of older podman, but I missed containers#8096
which added yet another logs test.

This brings us to three journalctl exceptions, which means
it gets complicated because I have to refactor it all.

**THIS IS NOT SUSTAINABLE**. We need some way to have a similar
setup in CI, with a permission-less rootless login, so we don't
add yet another logs test some day and discover, months later,
that it doesn't work on RHEL and then have to go into crisis
mode.

Signed-off-by: Ed Santiago <[email protected]>
pmoogi-redhat pushed a commit to pmoogi-redhat/podman that referenced this pull request Dec 15, 2020
Followup to containers#8284, due to my not having noticed containers#8096.

RHEL gating tests are failing again due to rhbz#1895105, the
one where we can't run journalctl rootless on RHEL. containers#8284 fixed
this for some RHEL builds of older podman, but I missed containers#8096
which added yet another logs test.

This brings us to three journalctl exceptions, which means
it gets complicated because I have to refactor it all.

**THIS IS NOT SUSTAINABLE**. We need some way to have a similar
setup in CI, with a permission-less rootless login, so we don't
add yet another logs test some day and discover, months later,
that it doesn't work on RHEL and then have to go into crisis
mode.

Signed-off-by: Ed Santiago <[email protected]>
mheon pushed a commit to mheon/libpod that referenced this pull request Jan 5, 2021
Followup to containers#8284, due to my not having noticed containers#8096.

RHEL gating tests are failing again due to rhbz#1895105, the
one where we can't run journalctl rootless on RHEL. containers#8284 fixed
this for some RHEL builds of older podman, but I missed containers#8096
which added yet another logs test.

This brings us to three journalctl exceptions, which means
it gets complicated because I have to refactor it all.

**THIS IS NOT SUSTAINABLE**. We need some way to have a similar
setup in CI, with a permission-less rootless login, so we don't
add yet another logs test some day and discover, months later,
that it doesn't work on RHEL and then have to go into crisis
mode.

Signed-off-by: Ed Santiago <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
@ypu ypu deleted the log-driver-test branch May 17, 2024 03:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants