Description of problem: PVC stat metrics are emitted from a node, even when PVC is not being used on that node. This creates unnecessary confusion and makes it hard to track where the PVC is being used. https://github.com/kubernetes/kubernetes/issues/57686
What should happen is - when a PVC is unmounted from a node, the metrics specific to the PVC should not be emitted from that node.
Origin PR: https://github.com/openshift/origin/pull/18637
Hemanth, this is already available in OCP 3.9 build, isnt it ? if yes, we need to move the status of this bug to ON_QA for verification. We have a tracker bug in CNS for this bugzilla, so the request.
Based on comment #7, this bug is verified. Thanks.
Tested on below version: openshift v3.9.24 kubernetes v1.9.1+a0ce1bc657 # uname -a Linux 3.10.0-693.21.1.el7.x86_64 #1 SMP Fri Feb 23 18:54:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo) But I found the kubelet_volume_stats related metrics did not show up. # oc get sc NAME PROVISIONER AGE standard (default) kubernetes.io/cinder 8h # oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE nfsc Bound pvc-c7b91603-4474-11e8-aac1-fa163e7c3848 1Gi RWO standard 36m # oc get pods NAME READY STATUS RESTARTS AGE nfs 1/1 Running 0 36m # oc get pods nfs -o yaml | grep node nodeName: 172.16.120.13 nodeSelector: node-role.kubernetes.io/compute: "true" # curl -k -H "Authorization: Bearer $(oc sa get-token prometheus -n openshift-metrics)" https://172.16.120.13:10250/metrics | grep volume_stats % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 112k 100 112k 0 0 916k 0 --:--:-- --:--:-- --:--:-- 922k Not sure whether the issue related my env, will try to build a new one and test.
The comment #12 happens on cinder, and we have another bug to track it. Re-test this on below version on aws: # oc version openshift v3.9.24 kubernetes v1.9.1+a0ce1bc657 # uname -a Linux ip-172-18-11-178.ec2.internal 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.5 (Maipo) This bug is fixed. When the pvc is deleted, the metrics are gone curl -k -H "Authorization: Bearer $(oc sa get-token prometheus -n openshift-metrics)" https://172.18.8.29:10250/metrics | grep volume_stats kubelet_volume_stats_used_bytes{namespace="o7ahm",persistentvolumeclaim="pvc-o7ahm"} 2.625536e+06 ... After delete the pvc, volume_stats related to pvc-o7ahm disappear.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:1566