bugGluster - Bugs: bug #22503, glusterfsd --pidfile flag not...

 
 

bug #22503: glusterfsd --pidfile flag not working properly

Submitted by:  None
Submitted on:  Thu 06 Mar 2008 02:49:16 PM UTC  
 
Category: GlusterFSSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Improper behaviour
Status: FixedPrivacy: Public
Assigned to: Amar Tumballi <amarts>Originator Name: 
Originator Email: -unavailable-Open/Closed: Closed
Release: Operating System: GNU/Linux
Reproducibility: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 12 Mar 2008 03:49:27 PM UTC, comment #1:

Patch committed in 'glusterfs--mainline--2.5--patch-697'

Amar Tumballi <amarts>
Project MemberIn charge of this item.
Thu 06 Mar 2008 02:49:16 PM UTC, original submission:

Using glusterfs-1.3.8pre2, the --pidfile command line argument does not work with glusterfsd, as the pidfile is not created/updated at all. After invertigation, looks like the pidfile_lock call inside glusterfs/src/glusterfs.c comes too early, before the command line arguments are parsed.

I made the following change in your code to get it working properly:

$ diff -u glusterfs/src/glusterfs.c.old glusterfs/src/glusterfs.c
--- glusterfs/src/glusterfs.c.old 2008-03-05 16:42:33.000000000 +0100
+++ glusterfs/src/glusterfs.c 2008-03-06 15:26:07.810731251 +0100
@@ -440,9 +440,6 @@
setrlimit (RLIMIT_CORE, &lim);
setrlimit (RLIMIT_NOFILE, &lim);

- if (pidfile)
- pidfd = pidfile_lock (pidfile);
-
asprintf (&ctx.logfile, "%s/log/glusterfs/%s.log",
DATADIR, basename (argv[0]));

@@ -454,6 +451,9 @@

argp_parse (&argp, argc, argv, 0, 0, &ctx);

+ if (pidfile)
+ pidfd = pidfile_lock (pidfile);
+
if (gf_log_init (ctx.logfile) == -1) {
fprintf (stderr,
"glusterfs: failed to open logfile \"%s\"\n",

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by amarts (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 12 Mar 2008 03:49:27 PM UTCamartsStatusNone=>Fixed
      Assigned toNone=>amarts
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1