Skip to main content
NetApp Knowledge Base

How much time trident operator pod takes to spin up during the upgrade or restart

Views:
17
Visibility:
Public
Votes:
0
Category:
astra_trident
Specialty:
snapx
Last Updated:

Applies to

Astra Trident

Answer

It completely depends on the time taken to pull the operator image from online or offline. 

Additional Information

Source code: https://github.com/netapp/trident/blob/master/operator/controllers/orchestrator/installer/installer.go

// Try to identify the reason for container not running, it could be a
                                                // temporary error due to latency in pulling the image or a more
                                                // permanent error like ImagePullBackOff.
                                                tempError := true
                                                containerErrors := make(map[string]string)
                                                if pod != nil {
                                                                for _, containerStatus := range pod.Status.ContainerStatuses {
                                                                                // If there exists a container still in creating state verify that
                                                                                // the reason for waiting is "ContainerCreating" and nothing else
                                                                                // like ImagePullBackOff
                                                                                if containerStatus.State.Waiting != nil {
                                                                                                if containerStatus.State.Waiting.Reason != "ContainerCreating" {
                                                                                                                tempError = false
                                                                                                                containerErrors[containerStatus.Name] = " Reason: " + containerStatus.State.Waiting.
                                                                                                                                Reason + ", " +
                                                                                                                                "Message: " + containerStatus.State.Waiting.Message
                                                                                                }
                                                                                }
                                                                }
                                                }

podNotify := func(err error, duration time.Duration) {
                                Log().WithFields(LogFields{
                                                "increment": duration,
                                }).Debugf("Trident pod not yet running, waiting.")
                }
                podBackoff := backoff.NewExponentialBackOff()
                podBackoff.MaxElapsedTime = k8sTimeout

                Log().Info("Waiting for Trident pod to start.")

                if err := backoff.RetryNotify(checkPodRunning, podBackoff, podNotify); err != nil {
                                totalWaitTime := k8sTimeout
                                // In case pod is still creating and taking extra time due to issues such as latency in pulling
                                // container image, then additional time should be allocated for the pod to come online.
                                if errors.IsTempOperatorError(err) {
                                                extraWaitTime := 150 * time.Second
                                                totalWaitTime = totalWaitTime + extraWaitTime
                                                podBackoff.MaxElapsedTime = extraWaitTime

                                                Log().Debugf("Pod is still provisioning after %3.2f seconds, "+
                                                                "waiting %3.2f seconds extra.", k8sTimeout.Seconds(), extraWaitTime.Seconds())
                                                err = backoff.RetryNotify(checkPodRunning, podBackoff, podNotify)
                                }

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.