kubeflow / mpi-operator

Kubernetes Operator for MPI-based applications (distributed training, HPC, etc.)
https://www.kubeflow.org/docs/components/training/mpi/
Apache License 2.0
417 stars 209 forks source link

removing klog.Fatalf in favor of a shutdown request #625

Closed emsixteeen closed 4 months ago

emsixteeen commented 4 months ago

Per this discussion in #619, this is an option to change klog.Fatalf() to favor of something less harsh.

google-oss-prow[bot] commented 4 months ago

[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 alculquicondor for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubeflow/mpi-operator/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
alculquicondor commented 4 months ago

I thought you had to upgrade klog?

emsixteeen commented 4 months ago

This is in lieu of upgrading klog!

Being that the controller (in the cmd package) already uses kubeapiserver.SetupSignalHandler() to create the stopCh, we can also use kubeapiserver.RequestShutdown() to close that channel.

In the first conversation I mentioned that in order not to call klog.Fatalf(), then either klog would need to be upgraded, or another option could be explored. This is the other option.

By the time I tested whether kubeapiserver.RequestShutdown() would work, the #619 was already merged! 😄

alculquicondor commented 4 months ago

/close

let's leave it for now.

It might be better to wait to upgrade and convert all logs to structured logging.

google-oss-prow[bot] commented 4 months ago

@alculquicondor: Closed this PR.

In response to [this](https://github.com/kubeflow/mpi-operator/pull/625#issuecomment-1928080324): >/close > >let's leave it for now. > >It might be better to wait to upgrade and convert all logs to structured logging. Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
emsixteeen commented 4 months ago

/close

let's leave it for now.

It might be better to wait to upgrade and convert all logs to structured logging.

👍