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

Set flags to test 'logs -f' with journald driver #12118

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

hshiina
Copy link
Contributor

@hshiina hshiina commented Oct 27, 2021

Signed-off-by: Hironori Shiina [email protected]

What this PR does / why we need it:

logs -f with journald is supported only when journald events backend is used. To pass system tests using logs -f in an environment where events_logger is not set to journald in container.conf, this fix set --events-backend or --log-driver temporally.

How to verify it

  • Run 035-logs.bats with containers.conf where events_logger is not journald.
  • Run 130-kill.bats with containers.conf where events_logger is not journald and log_driver is journald.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

`logs -f` with `journald` is supported only when `journald` events
backend is used. To pass system tests using `logs -f` in an environment
where `events_logger` is not set to `journald` in `containers.conf`,
this fix sets `--events-backend` or `--log-driver` temporally.

Signed-off-by: Hironori Shiina <[email protected]>
@TomSweeneyRedHat
Copy link
Member

Test failures look like network flakes, I've hit rerun

# Since PR#10431, 'logs -f' with journald driver is only supported with journald events backend.
if [[ $driver = "journald" ]]; then
run_podman info --format '{{.Host.EventLogger}}' >/dev/null
if [[ $output != "journald" ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Probably late-night brain malfunction on my part, but should this be == rather then !=?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think != is correct. When the event logger from containers.conf is NOT journald, I would like to add --events-backend jouranld so that logs -f works.

Thanks.

@rhatdan
Copy link
Member

rhatdan commented Oct 30, 2021

@edsantiago PTAL
LGTM

@edsantiago
Copy link
Member

Tested via:

# cat /etc/containers/containers.conf
[containers]
log_driver = "journald"

[engine]
events_logger = "file"

Confirmed that tests 035-logs and 130-kill fail on main, and pass under this PR. Confirmed that all other system tests behave the same (as in: mostly pass, but fail due to some new rootlessport thing) under this PR and the above containers.conf settings.

I feel super uncomfortable about the number of incompatible (and untested) config permutations we're having.

@edsantiago
Copy link
Member

/lgtm

Thank you @hshiina

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 1, 2021
@rhatdan
Copy link
Member

rhatdan commented Nov 2, 2021

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 2, 2021

[APPROVALNOTIFIER] This PR is APPROVED

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

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2021
@openshift-merge-robot openshift-merge-robot merged commit 0686f0b into containers:main Nov 2, 2021
@mheon mheon mentioned this pull request Dec 3, 2021
@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
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.

5 participants