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

Commit

Permalink
Fix panic when retry duration is exceeded (#2259)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilebox authored and k8s-ci-robot committed Aug 3, 2018
1 parent b88e56c commit a4d7fde
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/controller/controller_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,14 @@ func (c *controller) pollServiceInstance(instance *v1beta1.ServiceInstance) erro
//
// The instance's Ready condition should already be False, so
// we just need to record an event.
s := fmt.Sprintf("Error polling last operation: %v", err)
glog.V(4).Info(pcb.Message(s))
c.recorder.Event(instance, corev1.EventTypeWarning, errorPollingLastOperationReason, s)
reason := errorPollingLastOperationReason
message := fmt.Sprintf("Error polling last operation: %v", err)
glog.V(4).Info(pcb.Message(message))
c.recorder.Event(instance, corev1.EventTypeWarning, reason, message)

if c.reconciliationRetryDurationExceeded(instance.Status.OperationStartTime) {
return c.processServiceInstancePollingFailureRetryTimeout(instance, nil)
readyCond := newServiceInstanceReadyCondition(v1beta1.ConditionFalse, reason, message)
return c.processServiceInstancePollingFailureRetryTimeout(instance, readyCond)
}

return c.continuePollingServiceInstance(instance)
Expand Down

0 comments on commit a4d7fde

Please sign in to comment.