Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-45804

Installer fails GetMarketplaceImage with context deadline exceeds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.14.z, 4.15.z, 4.17.z, 4.16.z, 4.18.z, 4.19.z
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      In openshift/installer, when running GetMarketplaceImage, we get 

      encountered error: failed to fetch marketplace image: could not get marketplace image: compute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 – Original Error: context deadline exceeded

      This error comes from https://github.com/openshift/installer/blob/2b773d8339292cb3f2ba294e3b8f186da9cf7395/pkg/asset/installconfig/azure/client.go#L367-L378

      However, it doesn't have to timeout in 30 secs here, and considering the time required to the whole install, we should retry the request when it fails decent number of times.

      Also it's still using the deprecated SDK, which lacks retry mechanism.

      With the new SDK, there's a rich retry mechanism and that should retry when it gets certain errors.

      https://learn.microsoft.com/en-us/azure/storage/blobs/storage-retry-policy-go

      https://azure.github.io/azure-sdk/releases/deprecated/go.html

      https://github.com/Azure/azure-sdk-for-go/blob/69f43460d64e153c91e6fe52113ad31ce6f91a06/sdk/azcore/runtime/policy_retry.go#L106

       

      Version-Release number of selected component (if applicable):

      all versions implementing GetMarketplaceImage

      How reproducible:

      when there's a network issue.

      Steps to Reproduce:

      It relates to the network issue. not reproducible always.

          1.
          2.
          3.
          

      Actual results:

      It terminates immediately.

      Expected results:

      It should retry some times.

      Additional info:

          

              padillon Patrick Dillon
              rh-ee-atokubi Ayato Tokubi
              None
              None
              Gaoyun Pei Gaoyun Pei
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: