-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCPBUGS-46380: StaticPodOperatorStatus validation should reject downgrades and concurrent node rollouts #2123
Conversation
Hello @benluddy! Some important instructions when contributing to openshift/api: |
Skipping CI for Draft Pull Request. |
/test all |
@@ -252,6 +252,7 @@ type StaticPodOperatorStatus struct { | |||
// +listType=map | |||
// +listMapKey=nodeName | |||
// +optional | |||
// +kubebuilder:validation:XValidation:rule="size(self.filter(status, status.?targetRevision.orValue(0) != 0)) <= 1",message="no more than 1 node status may have a nonzero targetRevision" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing integration test
/payload-job periodic-ci-openshift-release-master-ci-4.19-e2e-gcp-ovn |
@benluddy: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/92294ac0-b80d-11ef-8f69-be8d4af6e02e-0 |
0473ef3
to
8b6f854
Compare
/payload-aggregated periodic-ci-openshift-release-master-ci-4.19-e2e-gcp-ovn 3 |
/payload-aggregate periodic-ci-openshift-release-master-ci-4.19-e2e-gcp-ovn 3 |
@benluddy: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7f63f180-b89c-11ef-9416-0d3097789c7a-0 |
I caught the static pod installer controller trying to decrease currentRevision and failing validation here in https://prow.ci.openshift.org/view/gs/test-platform-results/logs/openshift-api-2123-ci-4.19-e2e-gcp-ovn/1867227820942430208. |
@benluddy: This pull request references Jira Issue OCPBUGS-46380, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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. |
These node status states and transitions always indicate a bug in one of the static pod controllers.
8b6f854
to
f4a5275
Compare
/jira refresh |
@benluddy: This pull request references Jira Issue OCPBUGS-46380, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: In 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. |
/assign @deads2k |
type NodeStatus struct { | ||
// nodeName is the name of the node | ||
// +required | ||
NodeName string `json:"nodeName"` | ||
|
||
// currentRevision is the generation of the most recently successful deployment | ||
// +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="must only increase" | ||
CurrentRevision int32 `json:"currentRevision"` | ||
// targetRevision is the generation of the deployment we're trying to apply | ||
TargetRevision int32 `json:"targetRevision,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we'll make this only increase too
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benluddy, deads2k The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@benluddy: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
f5726c3
into
openshift:master
@benluddy: Jira Issue OCPBUGS-46380: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-46380 has been moved to the MODIFIED state. In 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. |
[ART PR BUILD NOTIFIER] Distgit: ose-cluster-config-api |
type NodeStatus struct { | ||
// nodeName is the name of the node | ||
// +required | ||
NodeName string `json:"nodeName"` | ||
|
||
// currentRevision is the generation of the most recently successful deployment | ||
// +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="must only increase" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this is not true. There is a fallback logic in SNO that might revert the CurrentRevision if the new revision fails to install. I think we should revert it; otherwise, it might break an SNO cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this reminds me of an earlier bug https://bugzilla.redhat.com/show_bug.cgi?id=1985997.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really here, but would it be compatible to instead validate that self.currentRevision == oldSelf.targetRevision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p0lyn0mial A clear logic for fallback we can see https://github.com/openshift/enhancements/blob/master/enhancements/kube-apiserver/startup-monitor.md, CurrentRevision won't decrease, when detecting problems with the new revision, the startup-monitor will copy the pod-manifest of the /etc/kubernetes/static-pods/last-known-good link (or the previous revision if the link does not exist, or don't do anything if there is no previous revision as in bootstrapping) into /etc/kubernetes.
/cherry-pick release-4.18 |
@benluddy: new pull request created: #2152 In 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-sigs/prow repository. |
No description provided.