Bug 1794388

Summary: How to get the Gluster disk usage metrics if i am running glusterfs-prometheous container as a sidecar along with glusterfs pod
Product: [Community] GlusterFS Reporter: Kannan <kannanv06>
Component: coreAssignee: bugs <bugs>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 6CC: bugs, rhs-bugs, sheggodu, vbellur
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-24 06:08:03 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:

Description Kannan 2020-01-23 13:35:03 UTC
Description of problem:

We need a Help from Gluster-prometheous team for setting up the Gfs metrics for our cluster.
We are running Glusterfs as a Pod. We are planning to run the gluster-prometheus as a side car along with Glusterfs pod.

I am getting the error when we are trying to get the Gluster disk usage metrics.
I have mounted /var/lib/heketi path from Host to the container.
Now It seems, I am not able to access the complete path for what it is expecting.
For example
Till the path "/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_6c4220c32d00b242c8f47e27f7108d06/" We are able to access. But Stats is expecting the folder bricks after this path which is not available. But this path is available at Glusterfs pod. It seems brick is mounted volume .

Now, How to get the Gluster disk usage metrics if i am running glusterfs-prometheous container as a sidecar along with glusterfs pod.

```
time="2020-01-23 13:14:58.270645" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_6c4220c32d00b242c8f47e27f7108d06/brick error="no such file or directory" volume=heketidbstorage
time="2020-01-23 13:14:58.270744" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_0537c55bd41ef9d79e14ef0a12fa5d9d/brick error="no such file or directory" volume=vol_0254adf66b9007754f7b4813a9bc7f82
time="2020-01-23 13:14:58.270782" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_977aefe3a0d2cd8eb2082e371ae8a3ad/brick error="no such file or directory" volume=vol_14bd20824965be5cc4daf8f3d09b9d09
time="2020-01-23 13:14:58.270816" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_c00577ccc2e9445392e9e6f30c7e32e6/brick error="no such file or directory" volume=vol_2bdd68443587361d64a93cb71aa2cddd
time="2020-01-23 13:14:58.270847" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_f5fea3a3e5344928507b9531b8905d99/brick error="no such file or directory" volume=vol_33a2fd67d388605be30d7447ffb894df
time="2020-01-23 13:14:58.270875" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_5faf3383629fb2afee06af22ed71a9bd/brick error="no such file or directory" volume=vol_33a2fd67d388605be30d7447ffb894df
time="2020-01-23 13:14:58.270902" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72ccb2f4cd714e4/brick_3f57d07ef2ae99925451b16f2ea547d2/brick error="no such file or directory" volume=vol_5804b0348e601b2998712c53e9e7d8a4
time="2020-01-23 13:14:58.270928" level=debug msg="Error getting disk usage" brick_path=/var/lib/heketi/mounts/vg_bb2793a5afec08e2b72cc```
```

Version-Release number of selected component (if applicable):


How reproducible:
Adding gluster-prometheous as a side car of glusterfs

Steps to Reproduce:
1.
2.
3.

Actual results:

Gluster disk usage metrics is not available

Expected results:
Gluster disk usage metrics should be  available


Additional info:

Comment 1 Sunil Kumar Acharya 2020-01-23 14:53:13 UTC
Moving the bug to upstream. 

@kannan, Please use the product "GlusterFS" while filing the bug.

Comment 2 Kannan 2020-01-24 06:08:03 UTC
Hi,
  Thanks for your Help... I found the solution for this problem...