Skip to content

Commit bc37ac4

Browse files
committed
Clarify status condition error message, and update architecture docs
1 parent bf2de82 commit bc37ac4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

doc/design/architecture.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ The OLM Operator will then pickup the installation and carry it through to compl
9393
### InstallPlan Control Loop
9494

9595
```
96-
None --> Planning +------>------->------> Installing --> Complete
97-
| ^
98-
v |
99-
+--> RequiresApproval --+
96+
None --> Planning +------>------->------> Installing +---> Complete
97+
| ^ |
98+
v | v
99+
+--> RequiresApproval --+ Failed
100100
```
101101

102102
| Phase | Description |
@@ -106,6 +106,7 @@ None --> Planning +------>------->------> Installing --> Complete
106106
| RequiresApproval | occurs when using manual approval, will not transition phase until `approved` field is true |
107107
| Installing | resolved resources in the InstallPlan `Status` block are being created |
108108
| Complete | all resolved resources in the `Status` block exist |
109+
| Failed | occurs when resources fail to install or there is an invalid OperatorGroup |
109110

110111
### Subscription Control Loop
111112

pkg/controller/operators/catalog/operator.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,20 +1346,19 @@ func (o *Operator) syncInstallPlans(obj interface{}) (syncError error) {
13461346
}
13471347

13481348
// Mark the InstallPlan as failed for a fatal Operator Group related error
1349-
ipFailError := fmt.Errorf("attenuated service account query failed - %v", err)
1350-
logger.Infof("InstallPlan failed: %v", ipFailError)
1351-
1349+
logger.Infof("attenuated service account query failed - %v", err)
1350+
ipFailError := fmt.Errorf("invalid operator group - %v", err)
13521351
now := o.now()
13531352
out := plan.DeepCopy()
13541353
out.Status.SetCondition(v1alpha1.ConditionFailed(v1alpha1.InstallPlanInstalled,
13551354
v1alpha1.InstallPlanReasonInstallCheckFailed, ipFailError.Error(), &now))
13561355
out.Status.Phase = v1alpha1.InstallPlanPhaseFailed
13571356

1358-
logger.Info("Transitioning InstallPlan to failed")
1357+
logger.Info("transitioning InstallPlan to failed")
13591358
if _, err := o.client.OperatorsV1alpha1().InstallPlans(plan.GetNamespace()).UpdateStatus(context.TODO(), out, metav1.UpdateOptions{}); err != nil {
13601359
updateErr := errors.New("error updating InstallPlan status: " + err.Error())
13611360
logger = logger.WithField("updateError", updateErr)
1362-
logger.Info("error transitioning InstallPlan to failed")
1361+
logger.Errorf("error transitioning InstallPlan to failed")
13631362

13641363
// retry sync with error to update InstallPlan status
13651364
syncError = fmt.Errorf("InstallPlan failed: %s and error updating InstallPlan status as failed: %s", ipFailError, updateErr)

0 commit comments

Comments
 (0)