Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Healthz endpoint returns 404 #188

Closed
mauriciopoppe opened this issue Mar 10, 2022 · 1 comment · Fixed by #190
Closed

Healthz endpoint returns 404 #188

mauriciopoppe opened this issue Mar 10, 2022 · 1 comment · Fixed by #190
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mauriciopoppe
Copy link
Member

/kind bug

I tried setting this in a manifest:

          image: <registry>/csi-node-driver-registrar:v2.5.0
          imagePullPolicy: IfNotPresent
          args:
            - "--csi-address=$(CSI_ENDPOINT)"
            - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
            - "--v=5"
            - "--http-endpoint=:9809"
          livenessProbe:
            httpGet:
              path: /healthz
              port: 9809
            initialDelaySeconds: 5
            timeoutSeconds: 5

The logs show:

I0310 07:28:29.658403    5752 node_register.go:95] Starting HTTP server at endpoint: :9809

Once started, the livenessProbe fails with 404, I did a port-forward to debug it locally

k -n kube-system port-forward pods/azuredisk-csi-driver-node-windows-rwwjd 9809:9809
Forwarding from 127.0.0.1:9809 -> 9809

# other terminal
curl localhost:9809/healthz
404 page not found

The path is set at this location

mux.HandleFunc("/healthz", func(w http.ResponseWriter, req *http.Request) {
, what's strange is that the pprof paths work e.g. if I also set --enable-pprof I can do:

curl localhost:9809/debug/pprof/
<html>
<head>
<title>/debug/pprof/</title>
...
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 10, 2022
@cnmcavoy
Copy link
Contributor

Pretty sure https://github.com/kubernetes-csi/node-driver-registrar/blob/master/cmd/csi-node-driver-registrar/node_register.go#L126 is wrong, and the second argument, nil, should be mux instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants