USHIFT-6469: Propagate service failures for correct exit code#6150
USHIFT-6469: Propagate service failures for correct exit code#6150openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
Conversation
|
@pmtk: This pull request references USHIFT-6469 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
a94e967 to
4bc8afb
Compare
pkg/servicemanager/manager.go
Outdated
| services: []Service{}, | ||
| serviceMap: make(map[string]Service), | ||
| startRec: startRec, | ||
| ErrChan: make(chan error, 1), |
There was a problem hiding this comment.
Can multiple services fail at the same time? This would only pick up one.
There was a problem hiding this comment.
But how do you wait for many on the other side if one is enough to kill the process?
And that could pollute an image - when first svc fail, the rest is canceled so they could fail with something unrelated
4bc8afb to
b31b6cc
Compare
Changes the way of restarting MicroShift in case of service failure. Previously ServiceManager would send a SIGTERM to MicroShift process to trigger shutdown, however that carries no context whatsoever. When service was failing to start and MicroShift quit before sending READY message, systemd would report MicroShift as failing with (readiness notification) protocol error which might be confusing. To avoid protocol error in case of quiting before readiness, MicroShft needs to exit with non-0 code which will happen if the RunMicroShift() function returns an error.
b31b6cc to
99f5c97
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pacevedom, pmtk 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 |
|
/verified by @pmtk |
|
@pmtk: This PR has been marked as verified by DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
@pmtk: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Changes the way of restarting MicroShift in case of service failure. Previously ServiceManager would send a SIGTERM to MicroShift process to trigger shutdown, however that carries no context whatsoever.
When service was failing to start and MicroShift quit before sending READY message, systemd would report MicroShift as failing with (readiness notification) protocol error which might be confusing.
To avoid protocol error in case of quiting before readiness, MicroShift needs to exit with non-0 code which will happen if the RunMicroShift() function returns an error.