Bug 1725211

Summary: User serviceable snapshots (USS) are not accessible after changing transport.socket.bind-address of glusterd
Product: [Community] GlusterFS Reporter: Raghavendra Bhat <rabhat>
Component: snapshotAssignee: bugs <bugs>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1727984 1728391 (view as bug list) Environment:
Last Closed: 2019-07-04 07:38:01 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: 1727984, 1728391    

Description Raghavendra Bhat 2019-06-28 17:24:26 UTC
Description of problem:

After editing the glusterd volfile to add a specific bind address, the snapshots of a gluster volume cannot be accessed via User Serviceable Snapshots feature (i.e. via .snaps hidden directory from the gluster mount point)

volume management
    type mgmt/glusterd
    option working-directory /var/lib/glusterd
    option transport-type socket,rdma
    option transport.socket.bind-address <bind address> <==== newly added
    option transport.tcp.bind-address <bind address> <==== newly added
    option transport.socket.keepalive-time 10
    option transport.socket.keepalive-interval 2
    option transport.socket.read-fail-log off
    option transport.socket.listen-port 24007
    option transport.rdma.listen-port 24008
    option ping-timeout 0
    option event-threads 1
#   option lock-timer 180
#   option transport.address-family inet6
#   option base-port 49152
    option max-port  60999
end-volume

Below are some instances of the tests where "No such file or directory" error is seen when a directory representing a snapshot is accessed.

gluster volume set mirror features.uss enable
volume set: success
[root@workstation ~]# cd /mnt/glusterfs/
[root@workstation glusterfs]# ls
dir  hosts
[root@workstation glusterfs]# cd .snaps
[root@workstation .snaps]# ls
ls: cannot access 'snap1': No such file or directory
ls: cannot access 'snap2': No such file or directory
snap1  snap2
[root@workstation .snaps]# ls
ls: cannot access 'snap1': No such file or directory
ls: cannot access 'snap2': No such file or directory
snap1  snap2
[root@workstation .snaps]# cd


Example 2:
============



mount -t glusterfs bro2:/arbiter-vol /mnt/snapshot
-----------------------------------------------------------------------------------------------


5. .snaps directory is accessible. 
-----------------------------------------------------------------------------------------------
[root@bro2 ~]# cd /mnt/snapshot/
[root@bro2 snapshot]# cd .snaps
[root@bro2 .snaps]# ls
snap1_GMT-2019.05.15-09.33.15
[root@bro2 .snaps]# 
-----------------------------------------------------------------------------------------------

6. Edited glusterd.vol to change the address:
-----------------------------------------------------------------------------------------------
# vim /etc/glusterfs/glusterd.vol

---------------------------------------------------------------
    option transport.socket.bind-address 10.74.131.X
    option transport.tcp.bind-address 10.74.131.92.X
---------------------------------------------------------------
-----------------------------------------------------------------------------------------------


7. Now listening to IP 10.74.131.X
-----------------------------------------------------------------------------------------------
# netstat -plant | grep 24007
tcp       13      0 x.x.x.x:24007      0.0.0.0:*               LISTEN      8530/glusterd       
tcp        0      0 127.0.0.1:24007         127.0.0.1:1011          TIME_WAIT   -                   
tcp        0      0 x.x.x.x:1023       x.x.x.x:24007      ESTABLISHED 7798/glusterfsd     
tcp      160      0 x.x.x.x:24007      x.x.x.x:1015       ESTABLISHED -                 
-----------------------------------------------------------------------------------------------


8. .snaps directory is accessible. 
-----------------------------------------------------------------------------------------------
[root@bro2 ~]# cd /mnt/snapshot/
[root@bro2 snapshot]# cd .snaps
[root@bro2 .snaps]# ls
snap1_GMT-2019.05.15-09.33.15
[root@bro2 .snaps]# 
-----------------------------------------------------------------------------------------------




########################################################################################################################################

Actual results:


[root@bro2 .snaps]# cd snap1_GMT-2019.05.15-09.33.15
cd:snap1_GMT-2019.05.15-09.33.15 : No such file or directory

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Raghavendra Bhat 2019-06-28 17:27:55 UTC
Steps to recreate:
===================

1) Create a gluster volume, start it and mount it
2) Create data and take couple of snapshots of the volume
3) Edit the glusterd volume file and add the following 2 options in the volume file of glusterd
   "option transport.socket.bind-address <bind address>
    option transport.tcp.bind-address <bind address>
4) Restart glusterd
5) Enable User Serviceable Snapshots
   "gluster volume set <volume name> features.uss enable
6) Enter .snaps and list the snapshots and try entering one of the directories that represent a snapshot
   cd <mount point>/.snaps/
   ls
   cd <snapshot>
 
6th step i.e. trying to access a snapshot gives "No such file or directory" error.

Comment 2 Worker Ant 2019-06-28 17:39:37 UTC
REVIEW: https://review.gluster.org/22974 (features/snapview-server: use the same volfile server for gfapi options) posted (#1) for review on master by Raghavendra Bhat

Comment 3 Worker Ant 2019-07-04 07:38:01 UTC
REVIEW: https://review.gluster.org/22974 (features/snapview-server: use the same volfile server for gfapi options) merged (#3) on master by Raghavendra Bhat