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

cluster-capi-operator undesirably restarts initially to be able to find CAPI CRDs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.17
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • No
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      The cluster-capi-operator controller-runtime manager has multiple controllers.
      
      One controller is responsible for installing the CAPI CRDs.
      
      Another controller sets up a watch to a resource, and that resource is belonging to one of the CRDs that the other controller installs.
      
      As such for a brief period of time we are seeing logs like:
      if kind is a CRD, it should be installed before calling Start
      
      which is expected.
      
      What is not expected is that once the CRD gets installed (by the first controller), the manager keeps retrying without finding it, and it eventually fails starting with timed out waiting for cache to be synced, in my case causing the operator to non-zero exit.
      
      Then after the restart the controller is able to Start, find the CRD and setup the Watch.
      
      This is a bug in controller-runtime behaviour:
      https://github.com/kubernetes-sigs/controller-runtime/issues/2589

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

      4.17    

      How reproducible:

      Always    

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          Operator exits 1 and pod restarts once in order to find CRDs

      Expected results:

          The CRDs are dynamically found without the need for restarting

      Additional info:

          

              ddonati@redhat.com Damiano Donati
              ddonati@redhat.com Damiano Donati
              None
              None
              Milind Yadav Milind Yadav
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: