Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.

Commit a4d7fde

Browse files
nileboxk8s-ci-robot
authored andcommitted
Fix panic when retry duration is exceeded (#2259)
1 parent b88e56c commit a4d7fde

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pkg/controller/controller_instance.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -958,12 +958,14 @@ func (c *controller) pollServiceInstance(instance *v1beta1.ServiceInstance) erro
958958
//
959959
// The instance's Ready condition should already be False, so
960960
// we just need to record an event.
961-
s := fmt.Sprintf("Error polling last operation: %v", err)
962-
glog.V(4).Info(pcb.Message(s))
963-
c.recorder.Event(instance, corev1.EventTypeWarning, errorPollingLastOperationReason, s)
961+
reason := errorPollingLastOperationReason
962+
message := fmt.Sprintf("Error polling last operation: %v", err)
963+
glog.V(4).Info(pcb.Message(message))
964+
c.recorder.Event(instance, corev1.EventTypeWarning, reason, message)
964965

965966
if c.reconciliationRetryDurationExceeded(instance.Status.OperationStartTime) {
966-
return c.processServiceInstancePollingFailureRetryTimeout(instance, nil)
967+
readyCond := newServiceInstanceReadyCondition(v1beta1.ConditionFalse, reason, message)
968+
return c.processServiceInstancePollingFailureRetryTimeout(instance, readyCond)
967969
}
968970

969971
return c.continuePollingServiceInstance(instance)

0 commit comments

Comments
 (0)