This message was deleted.
# longhorn-storage
a
This message was deleted.
f
It is quite normal. This command is the liveness probe used to determine whether the services exposed by the Longhorn instance-manager pods are still available. If they are not, Kubernetes restarts the offending pod. You can check the configuration of the instance-manager pods like:
Copy code
eweber@laptop:~/longhorn-manager> kl get pod -oyaml -l <http://longhorn.io/component=instance-manager|longhorn.io/component=instance-manager> | grep -i livenessprobe -A 12
      livenessProbe:
        exec:
          command:
          - /bin/sh
          - -c
          - test $(nc -zv localhost 8500 > /dev/null 2>&1 && nc -zv localhost 8501
            > /dev/null 2>&1 && nc -zv localhost 8502 > /dev/null 2>&1 && nc -zv localhost
            8503 > /dev/null 2>&1; echo $?) -eq 0
        failureThreshold: 3
        initialDelaySeconds: 3
        periodSeconds: 5
        successThreshold: 1
        timeoutSeconds: 4
--
      livenessProbe:
        exec:
          command:
          - /bin/sh
          - -c
          - test $(nc -zv localhost 8500 > /dev/null 2>&1 && nc -zv localhost 8501
            > /dev/null 2>&1 && nc -zv localhost 8502 > /dev/null 2>&1 && nc -zv localhost
            8503 > /dev/null 2>&1; echo $?) -eq 0
        failureThreshold: 3
        initialDelaySeconds: 3
        periodSeconds: 5
        successThreshold: 1
        timeoutSeconds: 4
--
      livenessProbe:
        exec:
          command:
          - /bin/sh
          - -c
          - test $(nc -zv localhost 8500 > /dev/null 2>&1 && nc -zv localhost 8501
            > /dev/null 2>&1 && nc -zv localhost 8502 > /dev/null 2>&1 && nc -zv localhost
            8503 > /dev/null 2>&1; echo $?) -eq 0
        failureThreshold: 3
        initialDelaySeconds: 3
        periodSeconds: 5
        successThreshold: 1
        timeoutSeconds: 4
You can see where the probes are defined in the Longhorn code at: https://github.com/longhorn/longhorn-manager/blob/224fa04290ac9daede00b565b1598b7c198d5a90/controller/instance_manager_controller.go#L1352
👍 1
n
Thank you so much!
👍 1