Bug 1589012

Summary: [RFE] - Block-volume details not listed in heketi metrics
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: vinutha <vinug>
Component: heketiAssignee: Madhu Rajanna <mrajanna>
Status: CLOSED ERRATA QA Contact: Sri Vignesh Selvan <sselvan>
Severity: high Docs Contact:
Priority: low    
Version: cns-3.10CC: akrishna, hchiramm, jmulligan, kramdoss, puebele, rhs-bugs, rtalur, sankarshan, sselvan, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: OCS 3.11.z Batch Update 2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: heketi-8.0.0-9.el7rhgs Doc Type: Bug Fix
Doc Text:
Previously, the Heketi prometheus metrics endpoint did not report the number of block volumes. With this fix, the number of block volumes in the cluster is included in the metrics.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-27 04:55:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1641685, 1641915    
Attachments:
Description Flags
heketi metrics output
none
heketi topology info none

Description vinutha 2018-06-08 08:20:17 UTC
Description of problem:
Heketi metrics does not list the block volumes info 

Version-Release number of selected component (if applicable):
# oc rsh heketi-storage-1-fddnp 
sh-4.2# rpm -qa | grep heketi
python-heketi-6.0.0-14.el7rhgs.x86_64
heketi-client-6.0.0-14.el7rhgs.x86_64
heketi-6.0.0-14.el7rhgs.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Create few blockvolumes and few file volumes from heketi
2. Run the heketi metrics 
3. Observed that only heketi file volumes are listed in metrics and not the block volumes. 

Actual results:
Heketi metrics does not show block volumes info

Expected results:
Heketi metrics should display block and file volumes 

Additional info:
heketi metrics output and heketi topology info

Comment 2 vinutha 2018-06-08 09:58:44 UTC
Created attachment 1449060 [details]
heketi metrics output

Comment 3 vinutha 2018-06-08 10:33:17 UTC
Created attachment 1449069 [details]
heketi topology info

Comment 20 Sri Vignesh Selvan 2019-02-28 05:06:13 UTC
O/P from prometheus GUI:

Block volumes count:
heketi_block_volumes_count{cluster="1855e85148e233b8d4d95a8af1e6f5c6",endpoint="heketi",instance="10.130.0.9:8080",job="heketi-storage",namespace="glusterfs",pod="heketi-storage-1-zxrml",service="heketi-storage"}	4

File volumes count:
heketi_volumes_count{cluster="1855e85148e233b8d4d95a8af1e6f5c6",endpoint="heketi",instance="10.130.0.9:8080",job="heketi-storage",namespace="glusterfs",pod="heketi-storage-1-zxrml",service="heketi-storage"}	5

O/P of heketi metrics:
heketi_block_volumes_count{cluster="1855e85148e233b8d4d95a8af1e6f5c6"} 4

heketi_volumes_count{cluster="1855e85148e233b8d4d95a8af1e6f5c6"} 5

Comment 21 Sri Vignesh Selvan 2019-03-01 09:14:39 UTC
Tried it on both Independent mode and converged mode setup:

For Independent mode O/P updated in comment #20
For converged mode setup O/P listed below

sh-4.2# heketi-cli volume list
Id:070d0b375e65c4ed1442ae48d9b43741    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:vol_070d0b375e65c4ed1442ae48d9b43741 [block]
Id:294f4184448c2dfc7c67f1d37ccb83d9    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:vol_294f4184448c2dfc7c67f1d37ccb83d9
Id:2ae3ded67476487f9eba6915b5af6d36    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:vol_2ae3ded67476487f9eba6915b5af6d36
Id:80830b06af904315a120cdedac1dfd84    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:vol_80830b06af904315a120cdedac1dfd84
Id:892e9861990ab828370c1836f30cf7d1    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:vol_892e9861990ab828370c1836f30cf7d1
Id:8e710eb13d567db067468e566f6c1c7f    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:vol_8e710eb13d567db067468e566f6c1c7f
Id:eac4060da73d0f57c3371b3d4bc474f4    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:heketidbstorage
sh-4.2# heketi-cli blockvolume list
Id:0bd327cd8c88cc0e327b1965810b8af5    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:blockvol_0bd327cd8c88cc0e327b1965810b8af5
Id:4ae80f30801eff316dbf883ca19fde25    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:blockvol_4ae80f30801eff316dbf883ca19fde25
Id:77efd1e5b29f7fe000163a15e3816793    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:blk_glusterfs_claim001_e7ddd6d0-3b21-11e9-868e-0a580a800205
Id:89af38fa420779512fc9b85cf43d2f8d    Cluster:2a40eb72f8b5bea927bf658e184e89c2    Name:blockvol_89af38fa420779512fc9b85cf43d2f8d


O/P from heketi-metrics:
heketi_block_volumes_count{cluster="2a40eb72f8b5bea927bf658e184e89c2"} 4
heketi_volumes_count{cluster="2a40eb72f8b5bea927bf658e184e89c2"} 7

O/P from prometheus UI:
heketi_block_volumes_count{cluster="2a40eb72f8b5bea927bf658e184e89c2",endpoint="heketi",instance="10.128.2.9:8080",job="heketi-storage",namespace="glusterfs",pod="heketi-storage-1-hpwhv",service="heketi-storage"}	4
heketi_volumes_count{cluster="2a40eb72f8b5bea927bf658e184e89c2",endpoint="heketi",instance="10.128.2.9:8080",job="heketi-storage",namespace="glusterfs",pod="heketi-storage-1-hpwhv",service="heketi-storage"}	7

Block volumes count are listed when executing newly added parameter heketi_block_volumes_count:
Hence Moving this bug to verified

Comment 22 Anjana KD 2019-03-15 03:10:07 UTC
Hi John,
I have updated the doc text. Kindly review it.

Comment 23 John Mulligan 2019-03-15 14:30:00 UTC
(In reply to Anjana from comment #22)
> Hi John,
> I have updated the doc text. Kindly review it.

LGTM

Comment 25 errata-xmlrpc 2019-03-27 04:55:35 UTC
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-2019:0663