Bug 763457 (GLUSTER-1725)

Summary: Init script misidentifies client as server
Product: [Community] GlusterFS Reporter: Marcus Bointon <marcus>
Component: buildAssignee: Amar Tumballi <amarts>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.5CC: gluster-bugs, vijay, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.