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

add metrics to cinder volume #62668

Merged
merged 1 commit into from Apr 19, 2018

Conversation

@zetaab
Member

zetaab commented Apr 16, 2018

What this PR does / why we need it: We need cinder volume metrics to be exposed

Which issue(s) this PR fixes:
Fixes #62644

Special notes for your reviewer: This is not tested in running cluster.

Release note:

Make volume usage metrics available for Cinder

cc @gnufied @dims

@gnufied

This comment has been minimized.

Member

gnufied commented Apr 16, 2018

Just to double check, you have verified kubelet stats metrics after this commit right?

@zetaab

This comment has been minimized.

Member

zetaab commented Apr 16, 2018

nah, I have not verified it. I will check that tomorrow and confirm

@@ -397,8 +403,7 @@ func makeGlobalPDName(host volume.VolumeHost, devName string) string {
}
func (cd *cinderVolume) GetPath() string {
name := cinderVolumePluginName
return cd.plugin.host.GetPodVolumeDir(cd.podUID, kstrings.EscapeQualifiedNameForDisk(name), cd.volName)
return getPath(cd.podUID, cd.volName, cd.plugin.host)

This comment has been minimized.

@dims

dims Apr 16, 2018

Member

I am not comfortable with this change. Do they even point to the same directory?

This comment has been minimized.

@zetaab

zetaab Apr 16, 2018

Member

if you check that getPath function in rows 82-85 it will do the same thing. It is just common function for all of these getpath calls.

This comment has been minimized.

@dims

dims Apr 17, 2018

Member

cool

@dims

This comment has been minimized.

Member

dims commented Apr 16, 2018

/hold

let's please not rush this in yet

@zetaab

This comment has been minimized.

Member

zetaab commented Apr 17, 2018

/test pull-kubernetes-e2e-gce

@zetaab

This comment has been minimized.

Member

zetaab commented Apr 17, 2018

with this code I can get following out of kubelet:

[root@kube-dev-node-1-1 log]# curl -s https://192.168.18.9:10250/metrics -k|grep kubelet_volume
# HELP kubelet_volume_stats_available_bytes Number of available bytes in the volume
# TYPE kubelet_volume_stats_available_bytes gauge
kubelet_volume_stats_available_bytes{namespace="default",persistentvolumeclaim="storage-myapp-0"} 7.836893184e+09
# HELP kubelet_volume_stats_capacity_bytes Capacity in bytes of the volume
# TYPE kubelet_volume_stats_capacity_bytes gauge
kubelet_volume_stats_capacity_bytes{namespace="default",persistentvolumeclaim="storage-myapp-0"} 8.32090112e+09
# HELP kubelet_volume_stats_inodes Maximum number of inodes in the volume
# TYPE kubelet_volume_stats_inodes gauge
kubelet_volume_stats_inodes{namespace="default",persistentvolumeclaim="storage-myapp-0"} 524288
# HELP kubelet_volume_stats_inodes_free Number of free inodes in the volume
# TYPE kubelet_volume_stats_inodes_free gauge
kubelet_volume_stats_inodes_free{namespace="default",persistentvolumeclaim="storage-myapp-0"} 524277
# HELP kubelet_volume_stats_inodes_used Number of used inodes in the volume
# TYPE kubelet_volume_stats_inodes_used gauge
kubelet_volume_stats_inodes_used{namespace="default",persistentvolumeclaim="storage-myapp-0"} 11
# HELP kubelet_volume_stats_used_bytes Number of used bytes in the volume
# TYPE kubelet_volume_stats_used_bytes gauge
kubelet_volume_stats_used_bytes{namespace="default",persistentvolumeclaim="storage-myapp-0"} 3.7736448e+07

@gnufied can you review this PR. Also @dims I did not fully understand why we could not use getPath common function to get things?

@dims

This comment has been minimized.

Member

dims commented Apr 17, 2018

@zetaab let's squash this and give some time for folks to review

/assign @FengyunPan2
/assign @anguslees

add metrics to cinder
cd -> r

fix
@FengyunPan2

/approve

@gnufied

This comment has been minimized.

Member

gnufied commented Apr 19, 2018

lets wait for @dims to remove the hold otherwise looks good to me.

/lgtm

@gnufied

This comment has been minimized.

Member

gnufied commented Apr 19, 2018

@zetaab may as well add a release-note about - "Make volume usage metrics available for Cinder" ?

@zetaab

This comment has been minimized.

Member

zetaab commented Apr 19, 2018

@gnufied added release-note

@dims

This comment has been minimized.

Member

dims commented Apr 19, 2018

/hold cancel

/lgtm

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Apr 19, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, FengyunPan2, gnufied, zetaab

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 19, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 19, 2018

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit 3856891 into kubernetes:master Apr 19, 2018

14 of 15 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation zetaab authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

k8s-merge-robot added a commit that referenced this pull request Apr 30, 2018

Merge pull request #62862 from zetaab/automated-cherry-pick-of-#62668-…
…upstream-release-1.10

Automatic merge from submit-queue.

Automated cherry pick of #62668: add metrics to cinder

Cherry pick of #62668 on release-1.10.

#62668: add metrics to cinder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment