Warn user and keep executing if Event Log Service is stopped#442
Warn user and keep executing if Event Log Service is stopped#442openshift-merge-bot[bot] merged 1 commit intocontainers:mainfrom
Conversation
|
cc @baude this is related to containers/podman#21426 |
|
The test failures should be fixed by fe7285a |
cfergeau
left a comment
There was a problem hiding this comment.
Looks good to me.
The handling of the debug flag is done in `setupLogging' after opening the event log, I don't know if this should be done unconditionally even if we could not open the event log, or if we keep the code as it currently is.
cmd/win-sshproxy/main.go
Outdated
| log, err := setupLogging(args[0]) | ||
| if err != nil { | ||
| os.Exit(1) | ||
| if sysErr, isSysErr := err.(syscall.Errno); isSysErr && sysErr == RPC_S_SERVER_UNAVAILABLE { |
There was a problem hiding this comment.
could this use https://pkg.go.dev/errors#Is to make this code simpler?
The fact is that if the event log service is disabled no logs will be written either if there is the debug flag or not. So i don't think it makes any difference. |
As reported by containers/podman#21426 , it may happen that during a Windows update the Event Log Service is disabled automatically without the user noticing it. In this case win-sshproxy fails at starting bc it is not able to write logs. However, the Event Log Service could also be disabled voluntarely by the user and we cannot be sure that the user want/can re-enable it. In such a case, a warn log is printed and win-sshproxy keeps executing. It should be up to the user to decide if to start the Event Log service again or keep running win-sshproxy without logs. Signed-off-by: lstocchi <lstocchi@redhat.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau, lstocchi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
As reported by containers/podman#21426 , it may happen that during a Windows update the Event Log Service is disabled automatically without the user noticing it. In this case win-sshproxy fails at starting bc it is not able to write logs.
However, the Event Log Service could also be disabled voluntarely by the user and we cannot be sure that the user want/can re-enable it.
With this patch, when the Event Log Service is not running, a warn log is printed and win-sshproxy keeps executing.
It should be up to the user to decide if to start the Event Log service again or keep running win-sshproxy without logs.