Bug 763457 (GLUSTER-1725) - Init script misidentifies client as server
Summary: Init script misidentifies client as server
Keywords:
Status: CLOSED WONTFIX
Alias: GLUSTER-1725
Product: GlusterFS
Classification: Community
Component: build
Version: 3.0.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-28 08:01 UTC by Marcus Bointon
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Marcus Bointon 2010-09-28 08:01:58 UTC
I just ran into an odd issue with the init script in 3.0.5 built from source running on Ubuntu 6.06 (old I know, but it's LTS). It uses LSB's pidofproc to see if there's already a server running. pidofproc uses the full path to the binary to ensure it's looking at the right one. Since gluster server and client use the same binary (glusterfs is a symlink to glusterfsd), if it's running a client but not a server, it will erroneously return the pid of the client, report that a server instance is already running (though fail to find a pid), and thus prevent the server from starting.
Looking at the docs for pidofproc, it's supposed to fail to return a pid if it doesn't find a pid file; in this case it wasn't returning a pid (there was no pid file for the server or client in /var/run), but for some reason it was still being counted as running. I don't know if this is an Ubuntu problem or just some random weirdness.

I solved it by stopping the client, then the server started ok (suggesting the matching path was the issue), then I remounted the client and it all worked.

This could be fixed by replacing the symlink from glusterfs to glusterfsd with a hard link, or (probably safer) replacing the symlink with a simple script wrapper around glusterfsd. This way the two programs would have real distinct paths and thus avoid the opportunity for conflict.

Comment 1 Amar Tumballi 2010-10-04 02:09:38 UTC
As its an enhancement, and from now on, init script should use 'glusterd' will take this post 3.1.0

Comment 2 Amar Tumballi 2011-01-20 08:07:35 UTC
Currently, there is no need to run 'glusterfs' and 'glusterfsd' from init commands, as everything is driven from 'glusterd'. Please upgrade to 3.1.x version.


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