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
Bug 1824943: check minimum available time in waitForDeploymentRollout #561
Conversation
@enxebre: This pull request references Bugzilla bug 1824943, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
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/test-infra repository. |
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.
/approve
/retest |
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.
Added a couple of comments, don't feel particularly strongly about either, otherwise looks sane
pkg/operator/operator_test.go
Outdated
@@ -25,6 +25,7 @@ import ( | |||
fakedynamic "k8s.io/client-go/dynamic/fake" | |||
"k8s.io/client-go/informers" | |||
fakekube "k8s.io/client-go/kubernetes/fake" | |||
clientgoscheme "k8s.io/client-go/kubernetes/scheme" |
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.
nit non-blocking: isn't this normally just imported as scheme? Don't think it clashes so could leave as scheme?
pkg/operator/sync.go
Outdated
} | ||
|
||
return nil | ||
} | ||
|
||
func (optr *Operator) waitForDeploymentRollout(resource *appsv1.Deployment) error { | ||
func (optr *Operator) waitForDeploymentRollout(resource *appsv1.Deployment, deploymentRolloutPollInterval, deploymentRolloutTimeout time.Duration) error { |
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.
These names don't need to be so long/descriptive while they're in this method, could shorten them + then they don't shadow the package level consts
func (optr *Operator) waitForDeploymentRollout(resource *appsv1.Deployment, deploymentRolloutPollInterval, deploymentRolloutTimeout time.Duration) error { | |
func (optr *Operator) waitForDeploymentRollout(resource *appsv1.Deployment, pollInterval, timeout time.Duration) error { |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexander-demichev 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 |
@enxebre: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
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.
/lgtm
@enxebre: All pull requests linked via external trackers have merged: openshift/machine-api-operator#561. Bugzilla bug 1824943 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 kubernetes/test-infra repository. |
There might be scenarios where the operator flips between degraded false/true.
E.g the managed deployment rolls out successfully. A particular business logic path makes one container to panic consistently. Go to 1.
https://github.com/openshift/api/blob/2ea89d203c53704f1fcfeb55c13ededab14fd020/config/v1/types_cluster_operator.go#L168
This results in a lower quality of service and Degraded should not oscillate but rather should remain true until the persistent observation of the problematic condition is fixed.
This PR cover this scenario by raising the expectation for the managed deployments to be available for a minimum duration, i.e 3 min.