Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-87385

Issue in failover process

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.0.3
    • Component/s: None
    • Labels:
    • ALL
    • Hide
      1. Apply this Networkpolicy or block Egress traffic from the secondary pod to the primary pod
      // Networkpolicy
      
      apiVersion: networking.k8s.io/v1
      kind: NetworkPolicy
      metadata:
        name: test-network-policy
        namespace: mw
      spec:
        podSelector:
          matchLabels:
            app.kubernetes.io/instance: x-mongo
        policyTypes:
        - Egress
        egress:
        - to:
          - ipBlock:
              cidr: 0.0.0.0/0
              except:
              - 192.168.242.35/32 // (Primary pod IP address)
      
      
      
      
      
      Show
      Apply this Networkpolicy or block Egress traffic from the secondary pod to the primary pod // Networkpolicy apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata:   name: test-network-policy   namespace: mw spec:   podSelector:     matchLabels:       app.kubernetes.io/instance: x-mongo   policyTypes:   - Egress   egress:   - to:     - ipBlock:         cidr: 0.0.0.0/0         except:         - 192.168.242.35/32 // (Primary pod IP address)

      I have many 3 nodes of MongoDB replica set on Kubernetes, recently we had an incident in our data center that affected our MongoDB clusters, clusters can't do the failover process successfully, to reproduce this issue after the incident I set a NetworkPolicy to block Egress from secondary nodes to the primary node. after applying this Networkpolicy cluster don't have any issues maybe the network policy doesn't drop established connections..., but after I restart one of the MongoDB nodes cluster try to failover and change the primary(unreachable node) with one of the secondary nodes but after a while, it continuously switches primary to secondary and secondary to primary again. 

       

       

       

            Assignee:
            chris.kelly@mongodb.com Chris Kelly
            Reporter:
            mhossini3458@gmail.com M Hosseini
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: