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

metrics endpoint will not be started because metrics-address was not specified #1120

Closed
jisnardo opened this issue May 29, 2020 · 9 comments
Closed
Labels
component/deployment Helm chart, kubernetes templates and configuration Issues/PRs wontfix This will not be worked on

Comments

@jisnardo
Copy link
Contributor

Describe the bug

Unable to get metrics from nodeplugin / provisioner.

Environment details

k8s v1.16
docker v18.6.3
csi-rbd v2.1.1 (latest available)
Ubuntu 18.04.4 LTS 4.15.0-101-generic

Steps to reproduce

Deploy the app.

NAME                                                   READY   STATUS    RESTARTS   AGE
pod/csi-rbd-ceph-csi-rbd-nodeplugin-bg4rn              3/3     Running   0          27h
pod/csi-rbd-ceph-csi-rbd-nodeplugin-rc4xf              3/3     Running   0          27h
pod/csi-rbd-ceph-csi-rbd-nodeplugin-sdz2b              3/3     Running   0          27h
pod/csi-rbd-ceph-csi-rbd-provisioner-cb66fd5b8-8thws   6/6     Running   0          27h
pod/csi-rbd-ceph-csi-rbd-provisioner-cb66fd5b8-pmhzm   6/6     Running   1          27h
pod/csi-rbd-ceph-csi-rbd-provisioner-cb66fd5b8-qctwh   6/6     Running   0          7h43m

NAME                                                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
service/csi-rbd-ceph-csi-rbd-nodeplugin-http-metrics    ClusterIP   10.90.8.59     <none>        8080/TCP   78d
service/csi-rbd-ceph-csi-rbd-provisioner-http-metrics   ClusterIP   10.90.182.75   <none>        8080/TCP   78d

NAME                                             DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/csi-rbd-ceph-csi-rbd-nodeplugin   3         3         3       3            3           <none>          78d

NAME                                               READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/csi-rbd-ceph-csi-rbd-provisioner   3/3     3            3           78d

NAME                                                          DESIRED   CURRENT   READY   AGE
replicaset.apps/csi-rbd-ceph-csi-rbd-provisioner-549bf5fbf    0         0         0       2d20h
replicaset.apps/csi-rbd-ceph-csi-rbd-provisioner-66cb99d9b8   0         0         0       27h
replicaset.apps/csi-rbd-ceph-csi-rbd-provisioner-7f97889cb4   0         0         0       2d20h
replicaset.apps/csi-rbd-ceph-csi-rbd-provisioner-cb66fd5b8    3         3         3       4d1h

Port forward to the pod / service.

kworkspace -n csi-rbd port-forward pod/csi-rbd-ceph-csi-rbd-nodeplugin-bg4rn 9000:8080
Forwarding from 127.0.0.1:9000 -> 8080
Forwarding from [::1]:9000 -> 8080
Handling connection for 9000

Get metrics.

curl localhost:9000/metrics
curl: (52) Empty reply from server

Fail.

E0529 12:31:41.632577   32278 portforward.go:400] an error occurred forwarding 9000 -> 8080: error forwarding port 8080 to pod 955b0dab9f51e92102b50ae0f419025bad0af7673b56a0a2a13e80738c4211c7, uid : exit status 1: 2020/05/29 12:31:41 socat[6002] E connect(5, AF=2 127.0.0.1:8080, 16): Connection refused

Actual results

Unable to get metrics from nodeplugin / provisioner.

Expected behavior

curl localhost:9000/metrics and get the metrics.

Logs

kworkspace -n csi-rbd logs csi-rbd-ceph-csi-rbd-provisioner-cb66fd5b8-z7k6n csi-attacher

I0525 08:11:07.949454       1 main.go:91] Version: v2.1.1-0-g57193d79
I0525 08:11:07.952374       1 connection.go:153] Connecting to unix:///csi/csi-provisioner.sock
I0525 08:11:08.954524       1 common.go:111] Probing CSI driver for readiness
I0525 08:11:08.954587       1 connection.go:182] GRPC call: /csi.v1.Identity/Probe
I0525 08:11:08.954612       1 connection.go:183] GRPC request: {}
I0525 08:11:08.965213       1 connection.go:185] GRPC response: {}
I0525 08:11:08.966581       1 connection.go:186] GRPC error: <nil>
I0525 08:11:08.966641       1 connection.go:182] GRPC call: /csi.v1.Identity/GetPluginInfo
I0525 08:11:08.966676       1 connection.go:183] GRPC request: {}
I0525 08:11:08.970928       1 connection.go:185] GRPC response: {"name":"rbd.csi.ceph.com","vendor_version":"v2.1.1"}
I0525 08:11:08.973737       1 connection.go:186] GRPC error: <nil>
I0525 08:11:08.973758       1 main.go:136] CSI driver name: "rbd.csi.ceph.com"

This is the main clue i have found.

W0525 08:11:08.973783       1 metrics.go:142] metrics endpoint will not be started because `metrics-address` was not specified.

helm chart values

All related to metrics as default.

nodeplugin:
  name: nodeplugin
  # if you are using rbd-nbd client set this value to OnDelete
  updateStrategy: RollingUpdate

  httpMetrics:
    # Metrics only available for cephcsi/cephcsi => 1.2.0
    # Specifies whether http metrics should be exposed
    enabled: true
    # The port of the container to expose the metrics
    containerPort: 8080

    service:
      # Specifies whether a service should be created for the metrics
      enabled: true
      # The port to use for the service
      servicePort: 8080
      type: ClusterIP

      # Annotations for the service
      # Example:
      # annotations:
      #   prometheus.io/scrape: "true"
      #   prometheus.io/port: "8080"
      annotations: {}

      clusterIP: ""

      ## List of IP addresses at which the stats-exporter service is available
      ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
      ##
      externalIPs: []

      loadBalancerIP: ""
      loadBalancerSourceRanges: []

...

provisioner:
  name: provisioner
  replicaCount: 3
  # Timeout for waiting for creation or deletion of a volume
  timeout: 60s

  httpMetrics:
    # Metrics only available for cephcsi/cephcsi => 1.2.0
    # Specifies whether http metrics should be exposed
    enabled: true
    # The port of the container to expose the metrics
    containerPort: 8080

    service:
      # Specifies whether a service should be created for the metrics
      enabled: true
      # The port to use for the service
      servicePort: 8080
      type: ClusterIP

      # Annotations for the service
      # Example:
      # annotations:
      #   prometheus.io/scrape: "true"
      #   prometheus.io/port: "8080"
      annotations: {}

      clusterIP: ""

      ## List of IP addresses at which the stats-exporter service is available
      ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
      ##
      externalIPs: []

      loadBalancerIP: ""
      loadBalancerSourceRanges: []

Additional context

n/a

Thanks in advance

@Madhu-1
Copy link
Collaborator

Madhu-1 commented May 29, 2020

nodeplugin uses the hostnetwork can you please verify it once using hostIP and port instead of localhost

@jisnardo
Copy link
Contributor Author

The test using host ip and port instead of localhost outputs the same result.

@nixpanic nixpanic added the component/deployment Helm chart, kubernetes templates and configuration Issues/PRs label Jun 2, 2020
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Jul 1, 2020

E0529 12:31:41.632577 32278 portforward.go:400] an error occurred forwarding 9000 -> 8080: error forwarding port 8080 to pod 955b0dab9f51e92102b50ae0f419025bad0af7673b56a0a2a13e80738c4211c7, uid : exit status 1: 2020/05/29 12:31:41 socat[6002] E connect(5, AF=2 127.0.0.1:8080, 16): Connection refused

looks to be an issue in kubernetes itself not in CSI, the kubernetes need to handle the port forwarding

This is the main clue i have found.
W0525 08:11:08.973783 1 metrics.go:142] metrics endpoint will not be started because metrics-address was not specified.

we are not starting any mertrics server in sidecar containers

@HaveFun83
Copy link

This is the main clue i have found.
W0525 08:11:08.973783 1 metrics.go:142] metrics endpoint will not be started because metrics-address was not specified.

we are not starting any mertrics server in sidecar containers

@Madhu-1 What about this one here?
https://github.com/ceph/ceph-csi/blob/master/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml#L159
https://github.com/ceph/ceph-csi/blob/master/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml#L130

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Sep 7, 2020

This is the main clue i have found.
W0525 08:11:08.973783 1 metrics.go:142] metrics endpoint will not be started because metrics-address was not specified.

we are not starting any mertrics server in sidecar containers

@Madhu-1 What about this one here?
https://github.com/ceph/ceph-csi/blob/master/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml#L159
https://github.com/ceph/ceph-csi/blob/master/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml#L130

This is the liveness sidecar which belongs to csi, not for the kubernetes sidecar containers, @jisnardo can you please retest this with v3.1.0?

@humblec
Copy link
Collaborator

humblec commented Sep 29, 2020

@jisnardo here is the feature request to consume CSI liveness sidecar #1096 .. we are not using it atm.

@jisnardo
Copy link
Contributor Author

Thanks @Madhu-1 @humblec

@Yuggupta27 Yuggupta27 removed their assignment Feb 19, 2021
@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 21, 2021
@github-actions
Copy link

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/deployment Helm chart, kubernetes templates and configuration Issues/PRs wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants