Skip to content

Commit 4b6ad66

Browse files
committed
Move slowCOUpdatePrefix Reason instead of Message
1 parent ba7f4f7 commit 4b6ad66

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: pkg/cvo/status.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,13 @@ func updateClusterVersionStatus(cvStatus *configv1.ClusterVersionStatus, status
328328
failingCondition.Message = failingMessage
329329
}
330330
if failure != nil &&
331-
skipFailure &&
332-
(progressReason == "ClusterOperatorUpdating" || progressReason == "ClusterOperatorsUpdating") &&
333-
strings.HasPrefix(progressMessage, slowCOUpdatePrefix) {
334-
progressMessage = strings.TrimPrefix(progressMessage, slowCOUpdatePrefix)
331+
strings.HasPrefix(progressReason, slowCOUpdatePrefix) {
335332
failingCondition.Status = configv1.ConditionUnknown
336333
failingCondition.Reason = "SlowClusterOperator"
337334
failingCondition.Message = progressMessage
338335
}
336+
progressReason = strings.TrimPrefix(progressReason, slowCOUpdatePrefix)
337+
339338
resourcemerge.SetOperatorStatusCondition(&cvStatus.Conditions, failingCondition)
340339

341340
// update progressing
@@ -589,13 +588,13 @@ func convertErrorToProgressing(now time.Time, statusFailure error) (reason strin
589588
}
590589
// returns true in those slow cases because it is still only a suspicion
591590
if len(exceeded) > 0 && !machineConfig {
592-
return uErr.Reason, fmt.Sprintf("%swaiting on %s over 30 minutes which is longer than expected", slowCOUpdatePrefix, strings.Join(exceeded, ", ")), true
591+
return slowCOUpdatePrefix + uErr.Reason, fmt.Sprintf("waiting on %s over 30 minutes which is longer than expected", strings.Join(exceeded, ", ")), true
593592
}
594593
if len(exceeded) > 0 && machineConfig {
595-
return uErr.Reason, fmt.Sprintf("%swaiting on %s over 30 minutes and machine-config over 90 minutes which is longer than expected", slowCOUpdatePrefix, strings.Join(exceeded, ", ")), true
594+
return slowCOUpdatePrefix + uErr.Reason, fmt.Sprintf("waiting on %s over 30 minutes and machine-config over 90 minutes which is longer than expected", strings.Join(exceeded, ", ")), true
596595
}
597596
if len(exceeded) == 0 && machineConfig {
598-
return uErr.Reason, fmt.Sprintf("%swaiting on machine-config over 90 minutes which is longer than expected", slowCOUpdatePrefix), true
597+
return slowCOUpdatePrefix + uErr.Reason, "waiting on machine-config over 90 minutes which is longer than expected", true
599598
}
600599
return uErr.Reason, fmt.Sprintf("waiting on %s", strings.Join(names, ", ")), true
601600
case payload.UpdateEffectFail:

0 commit comments

Comments
 (0)