[release-4.10] Self-hibernate on OCP 4.11#874
[release-4.10] Self-hibernate on OCP 4.11#874openshift-merge-robot merged 6 commits intoopenshift-kni:release-4.10from
Conversation
The functionality will be provided by NTO and PAO must not interfere with it in case someone installs this version on OCP 4.11. See the following: openshift/cluster-node-tuning-operator#322
|
@MarSik: No Bugzilla bug is referenced in the title of this pull request. 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 kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MarSik 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 |
Pull Request Test Coverage Report for Build 2403
💛 - Coveralls |
|
mm do we really want to do it? It will initiate the pod restart every time. |
maybe we could just add a flag and avoid starting the manager? performance-addon-operators/main.go Line 188 in 1df302f |
Why should it? Liveness probe? I am specifically not killing the process, just hibernating. And yes, we got a warning that some automated management systems might reinstall PAO 4.10 once NTO removes it in 4.11. It is of course a configuration bug on their side, however this looks like a rather cheap way to prevent such mistakes. |
Well, that could probably work, it still needs to sleep though. Ending the process would cause a restart. |
main.go
Outdated
|
|
||
| for { | ||
| select { | ||
| case sig := <-sigs: |
There was a problem hiding this comment.
I think we do not need select here, we should just have a blocking channel here
if sig := <-sigs; sig == syscall.SIGTERM {
signal.Stop(sigs)
klog.Info("SIGTERM caught")
break
}
There was a problem hiding this comment.
Well.. yeah, that would work as well. Isn't pretty much the same though? Easy to change anyway..
main.go
Outdated
| // Get OCP version objects (there should be just one) | ||
| clusterversionlist := v1.ClusterVersionList{} | ||
| ctx := context.Background() | ||
| err = k8sclient.List(ctx, &clusterversionlist) |
There was a problem hiding this comment.
nit: some syntax sugar
if err := k8sclient.List(context.TODO(), &clusterversionlist); err != nil {
...
}
There was a problem hiding this comment.
Line too long :D But yeah, I can do that.
|
Our CI is already running on top of 4.11 so if you do not filter CI cluster it will fail. |
|
@MarSik please mark this PR as [release 4.10] |
|
@MarSik: No Bugzilla bug is referenced in the title of this pull request. 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 kubernetes/test-infra repository. |
|
Seems to work as expected on a 4.11 nightly cluster |
|
/lgtm |
|
/retest |
The functionality will be provided by NTO and PAO must
not interfere with it in case someone installs this
version on OCP 4.11.
See the following:
openshift/cluster-node-tuning-operator#322