Bug 1254494

Summary: nfs-ganesha: refresh-config stdout output does not make sense
Product: [Community] GlusterFS Reporter: Meghana <mmadhusu>
Component: common-haAssignee: Kaleb KEITHLEY <kkeithle>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.3CC: kkeithle, ndevos, saujain, skoduri, vagarwal
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1252379 Environment:
Last Closed: 2016-06-16 13:32:25 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:
Bug Depends On: 1252379    
Bug Blocks:    

Description Meghana 2015-08-18 09:07:44 UTC
+++ This bug was initially created as a clone of Bug #1252379 +++

Description of problem: The output of the refresh-config command does not make any sense


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


How reproducible:
Always


Steps to Reproduce:
1. Execute the --refresh-config option "../ganesha-ha.sh"
2.
3.

Actual results:

                                                                                     100%  503     0.5KB/s   00:00    
method return sender=:1.61 -> dest=:1.65 reply_serial=2
export.vol3.conf                                                                                                                                                             100%  503     0.5KB/s   00:00    
method return sender=:1.62 -> dest=:1.66 reply_serial=2
export.vol3.conf                                                                                                                                                             100%  503     0.5KB/s   00:00    
method return sender=:1.62 -> dest=:1.66 reply_serial=2
method return sender=:1.71 -> dest=:1.75 reply_serial=2

Expected results:
The user should get appropriate messages that make sense


Additional info:

--- Additional comment from Anand Avati on 2015-08-12 05:59:30 EDT ---

REVIEW: http://review.gluster.org/11893 (common-ha : refresh-config should print sensible output) posted (#2) for review on master by Meghana M (mmadhusu)

Comment 1 Anand Avati 2015-08-18 09:11:15 UTC
REVIEW: http://review.gluster.org/11949 (common-ha : refresh-config should print sensible output) posted (#1) for review on release-3.7 by Meghana M (mmadhusu)

Comment 2 Anand Avati 2015-08-20 06:52:43 UTC
REVIEW: http://review.gluster.org/11949 (common-ha : refresh-config should print sensible output) posted (#2) for review on release-3.7 by Meghana M (mmadhusu)

Comment 3 Anand Avati 2015-08-24 06:31:57 UTC
REVIEW: http://review.gluster.org/11949 (common-ha : refresh-config should print sensible output) posted (#3) for review on release-3.7 by Meghana M (mmadhusu)

Comment 4 Anand Avati 2015-08-25 03:47:15 UTC
COMMIT: http://review.gluster.org/11949 committed in release-3.7 by Kaleb KEITHLEY (kkeithle) 
------
commit d7adcca24fb9638df2806c01d8ea7e73eec46928
Author: Meghana M <mmadhusu>
Date:   Wed Aug 12 14:48:39 2015 +0530

    common-ha : refresh-config should print sensible output
    
    ganesha-ha.sh --refresh-config printed the dbus-send output
    messages as is on the console. Improving the output
    of the operation by redirecting the messages to /var/log/messages
    and by checking the exit code of the command executed.
    
    The behaviour is also changed a litlle by exiting
    when refresh-config fails on any of the nodes.
    We don't want to continue changing config files
    on other nodes when refresh-config has already failed
    on one of the nodes.
    
    Change-Id: Ic2e4e26bc09b1ba23cc6b62a1590c6083a0bde80
    BUG: 1254494
    Signed-off-by: Meghana M <mmadhusu>
    Reviewed-on: http://review.gluster.org/11949
    Reviewed-by: soumya k <skoduri>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Tested-by: NetBSD Build System <jenkins.org>

Comment 7 Kaushal 2015-09-09 09:40:07 UTC
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.7.4, please open a new bug report.

glusterfs-3.7.4 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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/12496
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 8 Vijay Bellur 2015-10-28 09:25:00 UTC
REVIEW: http://review.gluster.org/12439 (common-ha: Corrected refresh-config output parsing) posted (#1) for review on release-3.7 by soumya k (skoduri)

Comment 9 Vijay Bellur 2015-11-02 09:17:50 UTC
REVIEW: http://review.gluster.org/12439 (common-ha: Corrected refresh-config output parsing) posted (#2) for review on release-3.7 by soumya k (skoduri)

Comment 10 Vijay Bellur 2015-11-02 10:02:28 UTC
REVIEW: http://review.gluster.org/12439 (common-ha: Corrected refresh-config output parsing) posted (#3) for review on release-3.7 by soumya k (skoduri)

Comment 11 Vijay Bellur 2016-03-14 11:45:20 UTC
REVIEW: http://review.gluster.org/13719 (common-ha : refresh-config should print sensible output) posted (#1) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 12 Vijay Bellur 2016-03-14 11:45:40 UTC
REVIEW: http://review.gluster.org/13724 (common-ha: Corrected refresh-config output parsing) posted (#1) for review on master by Kaleb KEITHLEY (kkeithle)

Comment 13 Vijay Bellur 2016-03-15 04:24:57 UTC
COMMIT: http://review.gluster.org/13719 committed in master by Kaleb KEITHLEY (kkeithle) 
------
commit dd1201e01f7f3cd86992f57f9b46f476bdb43d8c
Author: Meghana M <mmadhusu>
Date:   Wed Aug 12 14:48:39 2015 +0530

    common-ha : refresh-config should print sensible output
    
    ganesha-ha.sh --refresh-config printed the dbus-send output
    messages as is on the console. Improving the output
    of the operation by redirecting the messages to /var/log/messages
    and by checking the exit code of the command executed.
    
    The behaviour is also changed a litlle by exiting
    when refresh-config fails on any of the nodes.
    We don't want to continue changing config files
    on other nodes when refresh-config has already failed
    on one of the nodes.
    
    BUG: 1254494
    Change-Id: I33a1c0f750695135118b4ad4d5fa038b27bc7fec
    Signed-off-by: Meghana M <mmadhusu>
    Reviewed-on: http://review.gluster.org/11949
    Reviewed-by: soumya k <skoduri>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-on: http://review.gluster.org/13719
    Tested-by: Kaleb KEITHLEY <kkeithle>
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>

Comment 14 Vijay Bellur 2016-03-15 04:34:05 UTC
COMMIT: http://review.gluster.org/13724 committed in master by Kaleb KEITHLEY (kkeithle) 
------
commit 7240923a55eab2fc237d951ec0d89c51676a2aae
Author: Soumya Koduri <skoduri>
Date:   Wed Oct 28 14:50:55 2015 +0530

    common-ha: Corrected refresh-config output parsing
    
    >>>> Sample program with the earlier changes -
    output=$(dbus-send --print-reply --system \
    --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \
    org.ganesha.nfsd.exportmgr.RemoveExport uint16:5 2>&1\
      | grep -v "^method return")
    ret=$?
    echo "${output}"
    echo $ret
    sleep 1
    output=$(dbus-send --system --dest=org.ganesha.nfsd \
    /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \
    string:/usr/etc/ganesha/exports/export.vol3.conf \
    string:"EXPORT(Path=/vol3)" 2>&1  | grep -v "^method return")
    ret=$?
    echo "${output}"
    echo $ret
    
    Output:
    
    1
    
    1
    
    Even if the command was successfully executed, 'grep -v' has
    filtered out the output.
    
    >>>> Sample program with the current changes -
    
    output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \
    /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport\
     uint16:5 2>&1)
    ret=$?
    echo "${output}"
    echo $ret
    sleep 1
    output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \
    /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \
    string:/usr/etc/ganesha/exports/export.vol3.conf \
    string:"EXPORT(Path=/vol3)" 2>&1)
    ret=$?
    echo "${output}"
    echo $ret
    
    Output:
    method return sender=:1.155 -> dest=:1.174 reply_serial=2
    0
    method return sender=:1.155 -> dest=:1.175 reply_serial=2
       string "1 exports added"
    0
    
    BUG: 1254494
    Change-Id: I44fbe32588ec11f087c8b99b2d55ed55ba73727c
    Signed-off-by: Soumya Koduri <skoduri>
    Reviewed-on: http://review.gluster.org/12439
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: jiffin tony Thottan <jthottan>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Reviewed-on: http://review.gluster.org/13724
    Tested-by: Kaleb KEITHLEY <kkeithle>
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>

Comment 15 Niels de Vos 2016-06-16 13:32:25 UTC
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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user