Uploaded image for project: 'Red Hat OpenShift Data Science'
  1. Red Hat OpenShift Data Science
  2. RHODS-1619

Fix potential issue on Jupyterhub HA leader election

XMLWordPrintable

    • 2
    • False
    • False
    • No
    • 1.1.1-34
    • No
    • Hide
      There is a small chance that due to network issues, the Jupyterhub pods won't be able to see each other which would cause the non-leader pods to assume there is no leader and become the leader itself. In this case, we would have multiple pods running the Jupyterhub server and can potentially cause issues during spawn operations. This error shouldn't cause any issues for existing user notebook pods.
      A simple fix would be to delete the Jupyterhub server pods and let them perform the leader election again.
      Show
      There is a small chance that due to network issues, the Jupyterhub pods won't be able to see each other which would cause the non-leader pods to assume there is no leader and become the leader itself. In this case, we would have multiple pods running the Jupyterhub server and can potentially cause issues during spawn operations. This error shouldn't cause any issues for existing user notebook pods. A simple fix would be to delete the Jupyterhub server pods and let them perform the leader election again.
    • No
    • Yes
    • None
    • IDH Sprint 7, IDH Sprint 8, IDH Sprint 9

      As we have implemented High Availability on Jupyterhub, we shifted from 1 to 3 containers with the Leader Election strategy.

      With this implementation, we could bump into inconsistencies given that one Pod could be thinking he's still the leader elected, but others could have replaced it due to network problems.

      Implement a check to detect if a pod running is still the leader elected, and if not, delete it.

      In the following diagram we can detail the error:

      If somehow the pods bump into network problems, it might trigger a new election while the old container still thinks it's the leader, once the network issues are fixed, there will be two leaders, as there is no mechanism to probe the leader election an restart the pod.

       

      [SPIKE] We have already thought about using a liveness probe script ->  https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/

      The main issue with this exploration is that we could isolate the pod with the readinessProbe (not passing traffic ) and restart the container with the livenessProbe, but all of this only works on the container level, not the pod level. This won't acknowledge the problem in the sidecar container of the image.

       

       

        1. leader election issue.png
          235 kB
          Lucas Fernandez Aragon
        2. leader election issue-1.png
          235 kB
          Lucas Fernandez Aragon

            lferrnan@redhat.com Lucas Fernandez Aragon
            lferrnan@redhat.com Lucas Fernandez Aragon
            Luca Giorgi Luca Giorgi
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: