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

route controller manager exits after losing leader election and prevents MicroShift from stopping cleanly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • 4.14.0
    • 4.13
    • MicroShift
    • None
    • No
    • 3
    • Sprint 240, uShift Sprint 243
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None

      The route controller's callback for losing leader election exits the controller:

      https://github.com/openshift/route-controller-manager/blob/main/pkg/cmd/routecontroller/route.go#L67

      MicroShift embeds the controller, and needs it to stop without exiting the entire process so other controllers have a chance to shut down cleanly.

      Other controllers may use the library-go function ToLeaderElectionWithConfigmapLease which also calls exit:

      https://github.com/openshift/microshift/blob/main/vendor/github.com/openshift/library-go/pkg/config/leaderelection/leaderelection.go#L81

       

              ggiguash@redhat.com Gregory Giguashvili
              dhellman@redhat.com Doug Hellmann
              Melvin Joseph Melvin Joseph
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: