在升级或重新启动期间、Trident Operator Pod启动所需的时间
适用场景
Astra三端
问题解答
这 完全取决于从联机或脱机提取操作员映像所用的时间。
追加信息
源代码: https://github.com/NetApp/Trident/blob/master/operator/controller/stuator/installer/installer.go
//尝试确定容器未运行的原因、这可能是 //由于提取映像延迟而出现的临时错误、也可能是
ImagePullBackOff等更多
//永久错误。
错误:= true
containerErrors:
= make (map[string]string) if pod!
= nil{for _、containerStatus
:= range pod.Status.ContainerStatuses{//如果存在仍处于创建状态的容器、请确认//等待的原因是"ContainerCreating "、而无其他内容//
原因+"、"+"
消息:"+ containerStatus.State.waing.Message
}}}
pod通知:= func (错误,持续时间。持续时间)
{ Log().WithFelds (LogFids{"Increate":
duration,
}).dugf (“Trident POD尚未运行,正在等待。”)
}
podBackoff := backoff.NewExponitualBackOff() podBackoff.MaxElapsedTime
= k8sTimeout
log().Info("正在等待Trident POD启动。")
如果err := backoff.RetryNOTIC(checkPodRunning, PodBackoff, PodNOTIC); err !=零{ totalWaitTime :=
k8sTimeout
//如果POD仍在创建并且由于拉取//容器映像的延迟等问题而需要额外
的时间,则应为POD分配更多的时间使其联机。
If errors.IsTempOperatorError (err){
exTRAWaitTime:
= 150 * time.Second totalWaitTime = totalWaitTime + exTRAWaitTime PodBackoff.MaxElapsedTime
= exTRAWaitTime
log().dugf("Pod在%3.2f秒后仍在配置,"+"
额外等待%3.2f秒.",k8sTimeout.seconds(),extextreWaitTime.seconds()
) err= backoff.Retry通知(checkPodRunning, podBackoff,podNOTIC)}