Bug 771925 - [glusterfs-3.3.0qa19]: glusterd should not assume that within a second statedump will be taken
Summary: [glusterfs-3.3.0qa19]: glusterd should not assume that within a second stated...
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-05 12:04 UTC by Raghavendra Bhat
Modified: 2015-10-22 15:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-22 15:46:38 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2012-01-05 12:04:46 UTC
Description of problem:

glusterd which takes care of issuing SIGUSR1 to the brick processes for taking the statedump will write the options mentioned by the user (given through cli) about what all information has to be dumped to the statedump file. 

This is the piece of code from glusterd_brick_statedump function of glusterd which does the above functionality.

snprintf (dumpoptions_path, sizeof (dumpoptions_path),
                  "/tmp/glusterdump.%d.options", pid);
	glusterd_set_dump_options (dumpoptions_path, options, option_cnt);

        
        gf_log ("", GF_LOG_INFO, "Performing statedump on brick with pid %d",
		pid);

        kill (pid, SIGUSR1);

        sleep (1);
        unlink (dumpoptions_path);

        ret = 0;
out:
        if (pidfile)
                fclose (pidfile);
        return ret;


It can be seen from the code that, glusterd issues the SIGUSR1 signal to the brick process for taking statedump. But after that it sleeps for 1 second and then removes the file which contains the options provided by user.

The glusterfs process which receives the SIGUSR1 signal will look into the /tmp/glusterdump.%s.options file and dumps the information that have been mentioned in that file.

Instead of glusterd assuming the statedump would have been taken in 1 second and unlinking it would be good if the glusterfs process itself deletes the file after dumping the the information.

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 2012-12-04 10:13:45 UTC
http://review.gluster.org/2585 : it would need more of review cycles, but keeping in POST to indicate that some effort has been done on the issue.

Comment 2 Anand Avati 2013-07-30 09:49:45 UTC
REVIEW: http://review.gluster.org/2585 (statedump: glusterd should not unlink the options file for statedump) posted (#2) for review on master by Raghavendra Bhat (raghavendra)

Comment 3 Kaleb KEITHLEY 2015-10-22 15:46:38 UTC
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.


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