Skip to content

Commit

Permalink
pkg/cvo/upgradeable: Mention "between minor versions"
Browse files Browse the repository at this point in the history
Catching the message strings up with the softening from bcd58d8
(loosen upgradeable condition to allow z-level upgrades, 2020-01-02, #291),
addressing [1].

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1823306
  • Loading branch information
wking committed Apr 22, 2020
1 parent 2c4931d commit a9bb055
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cvo/upgradeable.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (optr *Operator) syncUpgradeable(config *configv1.ClusterVersion) error {
Type: configv1.OperatorUpgradeable,
Status: configv1.ConditionFalse,
Reason: "MultipleReasons",
Message: fmt.Sprintf("Cluster cannot be upgraded for multiple reasons: %s", strings.Join(reasons, ",")),
Message: fmt.Sprintf("Cluster cannot be upgraded between minor versions for multiple reasons: %s", strings.Join(reasons, ",")),
LastTransitionTime: now,
})
}
Expand Down Expand Up @@ -170,14 +170,14 @@ func (check *clusterOperatorsUpgradeable) Check() *configv1.ClusterOperatorStatu
reason := ""
if len(notup) == 1 {
reason = notup[0].condition.Reason
msg = fmt.Sprintf("Cluster operator %s cannot be upgraded: %s", notup[0].name, notup[0].condition.Message)
msg = fmt.Sprintf("Cluster operator %s cannot be upgraded between minor versions: %s", notup[0].name, notup[0].condition.Message)
} else {
reason = "ClusterOperatorsNotUpgradeable"
var msgs []string
for _, cond := range notup {
msgs = append(msgs, fmt.Sprintf("Cluster operator %s cannot be upgraded: %s: %s", cond.name, cond.condition.Reason, cond.condition.Message))
msgs = append(msgs, fmt.Sprintf("Cluster operator %s cannot be upgraded between minor versions: %s: %s", cond.name, cond.condition.Reason, cond.condition.Message))
}
msg = fmt.Sprintf("Multiple cluster operators cannot be upgradeable:\n* %s", strings.Join(msgs, "\n* "))
msg = fmt.Sprintf("Multiple cluster operators cannot be upgraded between minor versions:\n* %s", strings.Join(msgs, "\n* "))
}
cond.Reason = reason
cond.Message = msg
Expand Down

0 comments on commit a9bb055

Please sign in to comment.