Skip to content

Honor stderrthreshold when logtostderr is enabled#794

Open
pierluigilenoci wants to merge 1 commit intokubeflow:masterfrom
pierluigilenoci:fix/honor-stderrthreshold
Open

Honor stderrthreshold when logtostderr is enabled#794
pierluigilenoci wants to merge 1 commit intokubeflow:masterfrom
pierluigilenoci:fix/honor-stderrthreshold

Conversation

@pierluigilenoci
Copy link
Copy Markdown

Summary

Opt into the new klog behavior so that -stderrthreshold is honored even when -logtostderr=true (the default). Set stderrthreshold=INFO to preserve backward compatibility.

Background

When -logtostderr=true, -stderrthreshold was ignored -- all logs went to stderr. Fixed in kubernetes/klog#432 (v2.140.0+), but projects must opt in.

Changes

  • Added flag.Set("legacy_stderr_threshold_behavior", "false") and flag.Set("stderrthreshold", "INFO") after klog.InitFlags() in cmd/mpi-operator/main.go
  • Bumped k8s.io/klog/v2 from v2.130.1 to v2.140.0

References

Opt into the fixed klog behavior by setting legacy_stderr_threshold_behavior=false
after klog.InitFlags(). Ref: kubernetes/klog#212, kubernetes/klog#432

Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
@google-oss-prow google-oss-prow bot requested review from carmark and gaocegege March 26, 2026 23:22
@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign terrytangyuan for approval. For more information see the Kubernetes Code Review Process.

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

Details 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

@pierluigilenoci
Copy link
Copy Markdown
Author

Hi @tenzen-y, @terrytangyuan, @alculquicondor -- would you be willing to review? Thank you!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant