-
Notifications
You must be signed in to change notification settings - Fork 462
pkg/operator: correctly sync status for the CVO #406
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,15 +47,15 @@ func (optr *Operator) syncAll(rconfig renderConfig) error { | |
| if optr.inClusterBringup { | ||
| glog.Infof("[init mode] synced %s in %v", sf.name, time.Since(startTime)) | ||
| } | ||
| optr.syncProgressingStatus() | ||
| } | ||
|
|
||
| agg := utilerrors.NewAggregate(errs) | ||
| if agg != nil { | ||
| errs = append(errs, optr.syncFailingStatus(agg)) | ||
| agg = utilerrors.NewAggregate(errs) | ||
| return fmt.Errorf("error syncing: %v", agg.Error()) | ||
| } else if optr.inClusterBringup { | ||
| } | ||
| if optr.inClusterBringup { | ||
|
||
| glog.Infof("Initialization complete") | ||
| optr.inClusterBringup = false | ||
| } | ||
|
|
||
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.
Why this drop?
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.
setting Available doesn't necessarily clear progressing (taken from docs https://github.com/openshift/installer/blob/master/docs/user/overview.md)
It also looks like something other operators are doing (setting Avaiable can still be true while Failing and Progressing are also true)
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.
The other scenarios I've seen in other operators set the Conditions indipendently from the other conditions as well (which makes sense I believe)
Uh oh!
There was an error while loading. Please reload this page.
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.
you are quoting an example when operator is progressing or failing...
when the operator is available
from https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusteroperator.md#conditions
you cannot be failing, progressing and available for the same version.
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 should check the other Conditions I guess right
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.
updated
Uh oh!
There was an error while loading. Please reload this page.
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.
anyway, the status you quoted can already converge to without my latest additions (though they're indeed needed). Progressing and Failing are set before available anyway so when we're at Avaiable, we know where we are (I think)
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.
fixed here I believe now https://github.com/openshift/machine-config-operator/pull/406/files#diff-bee1f8f36240cb95db10244fdf335146R37