Bug 1787122 - 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 NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1725809
TreeView+ depends on / blocked
 
Reported: 2019-12-31 10:17 UTC by yati padia
Modified: 2020-03-09 06:25 UTC (History)
8 users (show)

Fixed In Version:
Clone Of: 1725809
Environment:
Last Closed: 2020-03-09 06:25:49 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 23945 0 None Merged mgmt/glusterd: Adding validation for statedump path 2020-03-09 06:25:48 UTC

Description yati padia 2019-12-31 10:17:20 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):
mainline

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.

Comment 1 Worker Ant 2020-01-06 07:25:06 UTC
REVIEW: https://review.gluster.org/23945 (mgmt/glusterd: Adding validation for statedump path) posted (#6) for review on master by Yati Padia

Comment 3 Worker Ant 2020-03-09 06:25:49 UTC
REVIEW: https://review.gluster.org/23945 (mgmt/glusterd: Adding validation for statedump path) merged (#21) on master by Sanju Rakonde


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