Bug 1446126 - S30samba-start.sh throws 'unary operator expected' warning during independent execution
Summary: S30samba-start.sh throws 'unary operator expected' warning during independent...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Anoop C S
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-27 09:58 UTC by Anoop C S
Modified: 2017-05-30 18:51 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.11.0
Clone Of:
Environment:
Last Closed: 2017-05-30 18:51:22 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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/


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