Bug 1258561 - Gluster puts PID files in wrong place
Gluster puts PID files in wrong place
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
mainline
All Unspecified
medium Severity medium
: ---
: ---
Assigned To: bugs@gluster.org
: Triaged
: GLUSTER-3063 (view as bug list)
Depends On:
Blocks: 1480516 1491060 GLUSTER-3063 1480423 1480459 1491059
  Show dependency treegraph
 
Reported: 2015-08-31 12:03 EDT by Jeff Darcy
Modified: 2017-12-08 12:31 EST (History)
5 users (show)

See Also:
Fixed In Version: glusterfs-3.13.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1480459 (view as bug list)
Environment:
Last Closed: 2017-12-08 12:31:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Darcy 2015-08-31 12:03:33 EDT
There's not a lot of consistency here, but most of the PID files for Gluster-related services seem to be going into $sharedstatedir (i.e. /var/lib/gluster).  This is wrong.  First it's wrong because it violates the principle of keeping *configuration* separate from *run time state*.  Second it's wrong because it violates standards which respect this separation.  I couldn't find anything in Fedora/RHEL packaging guidelines, but I did find the GNU document describing what these automake/autoconf variables are supposed to mean.

https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

According to that, what we're supposed to be using for per-node run-time state is $runstatedir (i.e. /var/run) which is itself supposed to be derived from $localstatedir (i.e. /var).  The doc specifically cites PID files as an example of what should be there.

One user already got bitten by this, because they were saving/restoring /var/lib/gluster across a server migration and ended up including bogus PID files.  Arguably their configuration/methodology is one we do not support, but that doesn't mean we should add extra obstacles that violate both standards and common sense.

(Component is unclassified because this affects multiple components.  I suggest that fixes in specific components be tracked by cloning this bug and adding a depencency.)
Comment 1 Kaleb KEITHLEY 2015-09-01 08:27:43 EDT
The Linux LSB, section 20.8 also says /var/run/basename.pid.
Comment 3 Vijay Bellur 2016-03-02 07:17:00 EST
REVIEW: http://review.gluster.org/13580 (glusterfs: Gluster should put PID file in correct place (/var/run/gluster/*)) posted (#1) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 4 Mike McCune 2016-03-28 19:43:17 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 5 Vijay Bellur 2016-04-05 08:37:28 EDT
REVIEW: http://review.gluster.org/13580 (glusterfs: Gluster should put PID file in correct location (/var/run/gluster/*)) posted (#2) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 6 Vijay Bellur 2016-04-05 08:38:23 EDT
REVIEW: http://review.gluster.org/13580 (glusterfs: Gluster should keep PID file in correct location (/var/run/gluster/*)) posted (#3) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 7 Vijay Bellur 2016-04-07 00:45:46 EDT
REVIEW: http://review.gluster.org/13580 (glusterfs: Gluster should keep PID file in correct location (/var/run/gluster/*)) posted (#4) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 8 Vijay Bellur 2016-04-07 06:30:01 EDT
REVIEW: http://review.gluster.org/13580 (glusterfs: Gluster should keep PID file in correct location (/var/run/gluster/*)) posted (#5) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 9 Vijay Bellur 2016-05-09 08:17:38 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#6) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 10 Vijay Bellur 2016-05-12 05:29:26 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#7) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 11 Vijay Bellur 2016-05-14 22:24:02 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#8) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 12 Vijay Bellur 2016-05-16 03:02:19 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#9) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 13 Vijay Bellur 2016-05-16 03:13:18 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#10) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 14 Vijay Bellur 2016-05-20 02:15:32 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#11) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 15 Worker Ant 2016-09-30 08:02:24 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#12) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 16 Worker Ant 2016-10-03 10:58:18 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#13) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 17 Worker Ant 2016-10-14 02:54:05 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#14) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 18 Worker Ant 2016-10-14 10:18:48 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#15) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 19 Worker Ant 2016-10-17 08:00:15 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#16) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 20 Worker Ant 2016-10-24 03:26:14 EDT
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#17) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 21 Worker Ant 2017-01-10 06:10:43 EST
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#18) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 22 Worker Ant 2017-01-10 06:57:20 EST
REVIEW: http://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#19) for review on master by Saravanakumar Arumugam (sarumuga@redhat.com)
Comment 23 Atin Mukherjee 2017-04-11 11:35:26 EDT
*** Bug 764795 has been marked as a duplicate of this bug. ***
Comment 24 Worker Ant 2017-08-10 08:16:29 EDT
REVIEW: https://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#20) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 25 Worker Ant 2017-08-10 09:07:46 EDT
REVIEW: https://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#21) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 26 Worker Ant 2017-08-10 11:46:20 EDT
REVIEW: https://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#22) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 27 Worker Ant 2017-08-10 21:51:08 EDT
REVIEW: https://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#23) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 28 Worker Ant 2017-08-10 22:21:17 EDT
REVIEW: https://review.gluster.org/13580 (glusterd: Gluster should keep PID file in correct location) posted (#24) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 29 Worker Ant 2017-08-11 03:36:45 EDT
COMMIT: https://review.gluster.org/13580 committed in master by Atin Mukherjee (amukherj@redhat.com) 
------
commit 220d406ad13d840e950eef001a2b36f87570058d
Author: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
Date:   Wed Mar 2 17:42:07 2016 +0530

    glusterd: Gluster should keep PID file in correct location
    
    Currently Gluster keeps process pid information of all the daemons
    and brick processes in Gluster configuration file directory
    (ie., /var/lib/glusterd/*).
    
    These pid files should be seperate from configuration files.
    Deletion of the configuration file directory might result into serious problems.
    Also, /var/run/gluster is the default placeholder directory for pid files.
    
    So, with this fix Gluster will keep all process pid information of all
    processes in /var/run/gluster/* directory.
    
    Change-Id: Idb09e3fccb6a7355fbac1df31082637c8d7ab5b4
    BUG: 1258561
    Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
    Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
    Reviewed-on: https://review.gluster.org/13580
    Tested-by: MOHIT AGRAWAL <moagrawa@redhat.com>
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Comment 30 Shyamsundar 2017-12-08 12:31:43 EST
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.13.0, please open a new bug report.

glusterfs-3.13.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2017-December/000087.html
[2] https://www.gluster.org/pipermail/gluster-users/

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