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

Verify logdriver and eventslogger will work together #1025

Closed
wants to merge 1 commit into from

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented May 7, 2022

Fixes:containers/podman#12175

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 label May 7, 2022
@rhatdan
Copy link
Member Author

rhatdan commented May 7, 2022

@edsantiago PTAL
This PR has a change of breaking current installs. We could just do the check on starting a service.

@edsantiago
Copy link
Member

LGTM but I don't feel qualified to slash-lgtm it. Sorry for late response.

@rhatdan
Copy link
Member Author

rhatdan commented May 11, 2022

@vrothberg @mheon @Luap99 @baude PTAL

func LoggingValid(logDriver string, eventsLogger string) error {

validLogDriver := []string{"file", "k8s-file", "journald", "none"}
validEventsLogger := []string{"file", "journald", "none"}
Copy link
Member

Choose a reason for hiding this comment

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

All of these strings should be constants.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

This does not look right to me. I expect there are many installations in the wild which have different log and events drivers. The linked issue in Podman could very well be a Podman-side bug.

I am terrified of this breaking backwards compat which it does.

if !util.StringInSlice(eventsLogger, validEventsLogger) {
return errors.Errorf("invalid EventsLogger %q must be one of %q", eventsLogger, strings.Join(validEventsLogger, ", "))
}
logErr := errors.Errorf("invalid logging combination LogDriver %q is not allowed with EventsLogger %q", logDriver, eventsLogger)
Copy link
Member

Choose a reason for hiding this comment

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

Please use fmt.Errorf.

Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps it is best to change to a Warnf and be done with it.

Copy link
Member

Choose a reason for hiding this comment

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

Can you elaborate on why we need this check? It seems legitimate to me to not use the same backend for logs and events but I may be missing something.

Copy link
Member

Choose a reason for hiding this comment

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

Full context is: containers/podman#12175 (podman-remote, different log drivers).

Copy link
Member Author

Choose a reason for hiding this comment

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

Bottom line this is not something we recommend and we should warn against it. I agree that we can not error on this.

@Luap99
Copy link
Member

Luap99 commented May 12, 2022

This does not look right to me. I expect there are many installations in the wild which have different log and events drivers. The linked issue in Podman could very well be a Podman-side bug.

I am terrified of this breaking backwards compat which it does.

I agree this will likely break many installations. Everything except logs will work so we should not fail unless logs is called.
If podman logs errors podman-remote logs should error the same. If this crashes the API server/client then this is broken inside podman.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 21, 2022

@rhatdan: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants