Bug 1725809 - glusterd allowing to set server.statedump-path to file, non-existent file and non-existent paths
Summary: glusterd allowing to set server.statedump-path to file, non-existent file and...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Srijan Sivakumar
QA Contact: Bala Konda Reddy M
URL:
Whiteboard:
Depends On: 1787122
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-01 13:37 UTC by Kshithij Iyer
Modified: 2021-05-04 00:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1787122 (view as bug list)
Environment:
Last Closed: 2021-05-04 00:14:58 UTC
Embargoed:


Attachments (Terms of Use)

Description Kshithij Iyer 2019-07-01 13:37:40 UTC
Description of problem:
server.statedump-path is the path where statedumps are stored, by default it is /var/run/gluster. And can be set to any valid directory path. It was observed that server.statedump-path was also accepting file, non-existent file and non-existent paths as well. And statedump command was successful even when statedumps with all the three invalid paths. 

Default:
################################################################################
# gluster v get rep all | grep server.statedump-path
server.statedump-path                   /var/run/gluster/                       
################################################################################

Setting it to a file and taking statedumps:(file exists)
################################################################################
# ls -l a.txt 
-rw-r--r--. 1 root root 0 Jul  1 16:38 a.txt
# gluster v set rep server.statedump-path /root/a.txt 
volume set: success
# gluster v statedump rep 
volume statedump: success
# cat a.txt
################################################################################

Setting it to a file which doesn't exists and taking statedumps: 
################################################################################
# gluster v set rep server.statedump-path /root/haha.txt 
volume set: success
# gluster v statedump rep 
volume statedump: success
# gluster v get rep all | grep server.statedump-path
server.statedump-path                   /root/haha.txt  
################################################################################


Setting to a dir which doesn't exists:
################################################################################
# gluster v set rep server.statedump-path /root/kshithij/
volume set: success
# gluster v statedump rep 
volume statedump: success
# gluster v get rep all | grep server.statedump-path
server.statedump-path                   /root/kshithij/      
################################################################################

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

How reproducible:
constantly 

Steps to Reproduce:
1.Create a volume of type replica (1x3).
2.Set server.statedump-path to:
  a. A file
  b. A non-existent file
  c. A non-existent paths
3.Take statedunp using the gluster statedump command:
# gluster v statedump rep 

Actual results:
glusterd allowing to set server.statedump-path to file, non-existent file and non-existent paths.

Expected results:
glusterd shouldn't allow to set server.statedump-path to file, non-existent file and non-existent paths.

Additional info:

Comment 7 yati padia 2019-12-26 07:01:20 UTC
I am working on this issue and trying to write the appropriate validate function to check for the correct and valid path. I will try to push the patch with the correct code ASAP.

Thanks,
Yati

Comment 18 SATHEESARAN 2021-05-04 00:14:58 UTC
Though the non-existing directory is still accepted as the valid value for gluster volume option of server.statedump-path,
leaving this issue open will not impact any of the use case. This is very rare use case which is again an incorrect action
from admin to provide the non-existing path to the value. When the admin/user after triggering the statedump, will definitely 
visit the directory and find that no such directory exists. When creating the directory, and next attempt of statedump always works fine.

To summarize, the default location of statedump is /var/run/gluster and changing this to any new location works
as long as the new location exists in the file path.

Considering the information above, it was concluded that this bug would be CLOSED


Note You need to log in before you can comment on or make changes to this bug.