Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1446126

Summary: S30samba-start.sh throws 'unary operator expected' warning during independent execution
Product: [Community] GlusterFS Reporter: Anoop C S <anoopcs>
Component: scriptsAssignee: Anoop C S <anoopcs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.11.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-30 18:51:22 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 Anoop C S 2017-04-27 09:58:54 UTC
Description of problem:
Hook script S30samba-start.sh when executed independently throws the following warning:

/var/lib/glusterd/hooks/1/start/post/S30samba-start.sh: line 105: [: =: unary operator expected

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

How reproducible:
Always

Steps to Reproduce:
1. Create a simple distribute/replicate volume
2. Start the volume
3. Run the script as follows:
# /var/lib/glusterd/hooks/1/start/post/S30samba-start.sh --volname=xcube --gd-workdir=/var/lib/glusterd

Actual results:
/var/lib/glusterd/hooks/1/start/post/S30samba-start.sh: line 105: [: =: unary operator expected

Expected results:
No warnings should be seen

Comment 1 Worker Ant 2017-04-27 10:04:21 UTC
REVIEW: https://review.gluster.org/17127 (extras/hooks: Use double quotes while using [..]) posted (#1) for review on master by Anoop C S (anoopcs)

Comment 2 Worker Ant 2017-04-27 16:11:24 UTC
COMMIT: https://review.gluster.org/17127 committed in master by Jeff Darcy (jeff.us) 
------
commit ec7a0c7eefacc68532bdc909f05a01eca8b3139d
Author: Anoop C S <anoopcs>
Date:   Thu Apr 27 14:34:08 2017 +0530

    extras/hooks: Use double quotes while using [..]
    
    This avoids the following warning when first operand is null
    
    [: =: unary operator expected
    
    Change-Id: I5439d8f60a6d9e30e6ba04c16c3de2096a87c38f
    BUG: 1446126
    Signed-off-by: Anoop C S <anoopcs>
    Reviewed-on: https://review.gluster.org/17127
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jeff.us>

Comment 3 Shyamsundar 2017-05-30 18:51:22 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.11.0, please open a new bug report.

glusterfs-3.11.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://lists.gluster.org/pipermail/announce/2017-May/000073.html
[2] https://www.gluster.org/pipermail/gluster-users/