Bug 1352875

Summary: Check for return code when glusterd is started in upgrade scenario
Product: [Community] GlusterFS Reporter: Anuradha <atalur>
Component: packagingAssignee: Kaleb KEITHLEY <kkeithle>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: mainlineCC: bugs, mchangir
Target Milestone: ---Keywords: EasyFix, StudentProject, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-12 12:45:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anuradha 2016-07-05 11:09:55 UTC
Description of problem:
During upgrade cases, when glusterd is started as part of upgrade (check glusterfs.spec.in), its return code is not checked.

Code snippet :
"else
    glusterd --xlator-option *.upgrade=on -N  <--- return code not checked

    #Cleaning leftover glusterd socket file which is created by glusterd in
    #rpm_script_t context.
    rm -rf /var/run/glusterd.socket
"

So when an error is hit, it is not communicated to the user. Even though glusterd logs errors in the glusterd logfile, on the cli side no failure is seen. This is misleading. Some genuine failures go unnoticed.

A problem was seen in upgrade from 3.6.x to 3.7.9 where glusterd start on upgrade failed. As a consequence new volfiles were not generated and index xlator didn't get the options that it was supposed to be provided with. Leading to incorrect functionality of index translator and AFR selfheal.

So it would be better if we at least print a warning on the command line interface during such failures.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Install glusterfs 3.6.x
2. create a replicate volume
3. kill all gluster processes
4. update glusterfs to 3.7.9 using yum update


Actual results:
A failure is seen in the 4th step as per glusterd logs but not on cli.

Expected results:
If there is a failure in bringing up glusterd, it should be indicated on the cli too.

Additional info:

Comment 1 Milind Changire 2016-07-07 07:30:34 UTC
In the %post server section scriptlet, glusterd runs in an upgrade mode testing for a running glusterd instance before proceeding. In the event that the glusterd upgrade fails, it exits with a non-zero exit code. In such a case, an explicit WARNING should now be emitted to the console from the scriptlet indicating an upgrade failure. Also, a normal path glusterd restart is to be avoided if glusterd was found to be running before the upgrade was attempted and the scriptlet should return a non-zero exit code to mark an upgrade failure.

Comment 3 Amar Tumballi 2019-07-02 03:42:40 UTC
Considering this is not worked on in last 3 years, inclined towards closing DEFERRED.

Comment 4 Worker Ant 2020-03-12 12:45:24 UTC
This bug is moved to https://github.com/gluster/glusterfs/issues/939, and will be tracked there from now on. Visit GitHub issues URL for further details