Bug 1454311

Summary: [libgfapi statedump] : Use "localhost" instead of passing hostnames with the client parameter for libgfapi statedumps
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Ambarish <asoman>
Component: libgfapiAssignee: Poornima G <pgurusid>
Status: CLOSED NOTABUG QA Contact: Vivek Das <vdas>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, bturner, jthottan, kkeithle, mbenjamin, rhinduja, rhs-bugs, sasundar, skoduri, storage-qa-internal
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: 2018-11-19 06:31:22 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 Ambarish 2017-05-22 12:40:41 UTC
Description of problem:
-----------------------

CLI support for providing the "client" parameter seems to be broken atm.

The only way I got it the dump the sate for Ganesha is by using localhost instead of hostname :

gluster v statedump testvol client localhost:<PID of Ganesha>

selinux was permissive all along.

[root@rhs-srv-17 ~]# getenforce 
Permissive
[root@rhs-srv-17 ~]# 

This needs to be either fixed/documented.


<snip>

[root@rhs-srv-17 ~]# gluster v statedump testvol client rhs-srv-17.gdev.lab.eng.bos.redhat.com:9693
volume statedump: success
[root@rhs-srv-17 ~]# 

[root@rhs-srv-17 ~]# ll /var/run/gluster
total 388
srwxr-xr-x. 1 root root      0 May 17 12:45 6704743efd402e9d2ead7fb3664c6a12.socket
srwxr-xr-x. 1 root root      0 May 10 12:26 802bd4649233e275e4ac7d3afd74ebc2.socket
srwxr-xr-x. 1 root root      0 May 17 12:45 8139eec5151b696580a9474c83fc25e5.socket
srwxr-xr-x. 1 root root      0 May 17 12:45 changelog-744cc660674c2438cb425c257ec9ddad.sock
srwxr-xr-x. 1 root root      0 May 17 12:45 changelog-7992629e1003728219aa02ecf63cbff8.sock
srwxr-xr-x. 1 root root      0 May 10 12:26 changelog-a9bf0a82aba38610df80c75a9adc45ad.sock
srwxr-xr-x. 1 root root      0 May 17 12:45 ee536f5a8bf177bba40326390b3ef54f.socket
-rw-r--r--. 1 root root 194052 May 19 03:55 Interval1
-rw-r--r--. 1 root root 194052 May 19 04:03 Interval2
drwxr-xr-x. 5 root root   4096 May 10 12:26 shared_storage
drwxr-xr-x. 2 root root     40 Apr 25 09:59 snaps

[root@rhs-srv-17 ~]# gluster v statedump testvol client localhost:9693
volume statedump: success
[root@rhs-srv-17 ~]# 
[root@rhs-srv-17 ~]# ll /var/run/gluster
total 440
srwxr-xr-x. 1 root root      0 May 17 12:45 6704743efd402e9d2ead7fb3664c6a12.socket
srwxr-xr-x. 1 root root      0 May 10 12:26 802bd4649233e275e4ac7d3afd74ebc2.socket
srwxr-xr-x. 1 root root      0 May 17 12:45 8139eec5151b696580a9474c83fc25e5.socket
srwxr-xr-x. 1 root root      0 May 17 12:45 changelog-744cc660674c2438cb425c257ec9ddad.sock
srwxr-xr-x. 1 root root      0 May 17 12:45 changelog-7992629e1003728219aa02ecf63cbff8.sock
srwxr-xr-x. 1 root root      0 May 10 12:26 changelog-a9bf0a82aba38610df80c75a9adc45ad.sock
srwxr-xr-x. 1 root root      0 May 17 12:45 ee536f5a8bf177bba40326390b3ef54f.socket
-rw-------. 1 root root  51100 May 22 08:26 glusterdump.9693.dump.1495455978
-rw-r--r--. 1 root root 194052 May 19 03:55 Interval1
-rw-r--r--. 1 root root 194052 May 19 04:03 Interval2
drwxr-xr-x. 5 root root   4096 May 10 12:26 shared_storage
drwxr-xr-x. 2 root root     40 Apr 25 09:59 snaps
[root@rhs-srv-17 ~]# 


</snip>

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

3.8.4-25

How reproducible:
----------------

every which way I try.

Steps to Reproduce:
-------------------

In description.

Comment 2 Ambarish 2017-05-22 12:43:20 UTC
Sorry Atin and I collided.

Changing assignee to Poornima.

Comment 3 Poornima G 2017-05-23 04:45:26 UTC
As dscussed, for Ganesha and Samba and i think  Qemu as well, localhost is what has to be  specified, as localost is the default volfileserver. And this is a debugging feature and not a mainstream feature, so i think we should be liveable with this?

Comment 4 Atin Mukherjee 2017-05-23 04:54:32 UTC
(In reply to Poornima G from comment #3)
> As dscussed, for Ganesha and Samba and i think  Qemu as well, localhost is
> what has to be  specified, as localost is the default volfileserver. And
> this is a debugging feature and not a mainstream feature, so i think we
> should be liveable with this?

I agree, please convert this to a doc bug.

Comment 5 Soumya Koduri 2017-05-23 06:14:20 UTC
(In reply to Atin Mukherjee from comment #4)
> (In reply to Poornima G from comment #3)
> > As dscussed, for Ganesha and Samba and i think  Qemu as well, localhost is
> > what has to be  specified, as localost is the default volfileserver. And
> > this is a debugging feature and not a mainstream feature, so i think we
> > should be liveable with this?
> 
> I agree, please convert this to a doc bug.

I agree that its not something to be immediately resolved, but IMO should be addressed in near future (unless very complicated) as it may cause inconvenience to login to each machine every time we need a statedump for entire cluster. So I suggest to have another bug filed to document it and have this bug marked for future release.

Comment 6 SATHEESARAN 2017-05-26 15:11:17 UTC
(In reply to Poornima G from comment #3)
> As dscussed, for Ganesha and Samba and i think  Qemu as well, localhost is
> what has to be  specified, as localost is the default volfileserver. And
> this is a debugging feature and not a mainstream feature, so i think we
> should be liveable with this?

The statement includes QEMU and that's incorrect.

I could get the gluster statedump of the gfapi application ( QEMU ) with the hostname or IP. In this case, gfapi application (QEMU) is running on the host outside of Trusted Storage Pool.


# gluster volume statedump <vol> client <FQDN/IP_of host>:<QEMU-pid> triggers the statedump, but hit an SELinux AVC denial issue. When SELinux is on permissive mode, it generates the statedump

Comment 13 Poornima G 2018-11-19 06:31:22 UTC
Closing the bug, this feature is not something that is of priority for now. The appropriate changes is made in the doc. Hence closing the bug.