Bug 1352875 - Check for return code when glusterd is started in upgrade scenario
Summary: Check for return code when glusterd is started in upgrade scenario
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: packaging
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Kaleb KEITHLEY
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-05 11:09 UTC by Anuradha
Modified: 2020-03-12 12:45 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-12 12:45:24 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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


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