Bug 1163871 - create_vol.sh badly process <vol-mnt-prefix> with trailing slash
Summary: create_vol.sh badly process <vol-mnt-prefix> with trailing slash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhs-hadoop-install
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.0.4
Assignee: Jeff Vance
QA Contact: Daniel Horák
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-13 15:46 UTC by Daniel Horák
Modified: 2015-05-13 17:53 UTC (History)
6 users (show)

Fixed In Version: 2.38-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-31 10:18:32 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:0761 0 normal SHIPPED_LIVE Red Hat Storage Server 3 Hadoop plug-in enhancement update 2015-03-31 14:17:20 UTC

Description Daniel Horák 2014-11-13 15:46:14 UTC
Description of problem:
When I put path with trailing slash as <vol-mnt-prefix> argument (/mnt/glusterfs/), it will create ugly fstab record (/mnt/glusterfs//HadoopVol1) and make problems later for enable_vol.sh.
Version-Release number of selected component (if applicable):
  # rpm -q rhs-hadoop-install
    rhs-hadoop-install-2_29-1.el6rhs.noarch

How reproducible:
  100%

Steps to Reproduce:
1. Run create_vol.sh and as <vol-mnt-prefix> use path with trailing slash:
  # ./create_vol.sh --verbose HadoopVol1 /mnt/glusterfs/ NODE1:/mnt/brick1 NODE2
    ***
    *** create_vol: version 2.29
    ***
    --- determining if HadoopVol1 spans entire storage pool...
    --- done determining if HadoopVol1 spans entire storage pool

    *** Volume        : HadoopVol1
    *** Nodes         : NODE1, NODE2
    *** Volume mount  : /mnt/glusterfs/
    *** Brick mounts
          NODE1  : /mnt/brick1 
          NODE2  : /mnt/brick1 

    --- verifying consistent hadoop UIDs and GIDs across nodes...
    --- completed verifying hadoop UIDs and GIDs
    --- checking all nodes spanned by HadoopVol1...
    all nodes passed check for hadoop workloads
    Creating new volume HadoopVol1. Continue? [y|N] y
    --- creating the new HadoopVol1 volume...
    --- "HadoopVol1" created
    --- setting performance options on HadoopVol1...
    --- performance options set
    --- starting the new HadoopVol1 volume...
    "HadoopVol1" started
    --- creating glusterfs-fuse mounts for HadoopVol1...
    --- created glusterfs-fuse mounts for HadoopVol1
    --- adding hadoop directories to nodes spanned by HadoopVol1...
    --- added hadoop directories to nodes spanned by HadoopVol1
    "HadoopVol1" created and started with no errors

2. Check /etc/fstab record for HadoopVol1 (see the two slashes together in the path)
  # grep HadoopVol1 /etc/fstab 
   NODE1:/HadoopVol1 /mnt/glusterfs//HadoopVol1 glusterfs entry-timeout=0,attribute-timeout=0,use-readdirp=no,_netdev 0 0

3. Try to enable HadoopVol1:
  # ./enable_vol.sh --verbose --make-default HadoopVol1
    ***
    *** enable_vol: version 2.29
    ***
    No management node specified therefore the localhost (NODE1) is assumed
      Continue? [y|N] y
    No yarn-master node specified therefore the localhost (NODE1) is assumed
      Continue? [y|N] y
    No RHS storage node specified therefore the localhost (NODE1) is assumed
      Continue? [y|N] y

    *** Volume             : HadoopVol1 (will become the DEFAULT volume)
    *** Current default vol: gv0
    *** Nodes              : NODE2, NODE1
    *** Volume mount       : /mnt/glusterfs/HadoopVol1
    *** Ambari mgmt node   : NODE1
    *** Yarn-master server : NODE1

    Enabling volume HadoopVol1. Continue? [y|N] y
    --- setting up the yarn-master: NODE1...
    --- done setting up the yarn-master
    --- verifying consistent hadoop UIDs and GIDs across nodes...
    --- completed verifying hadoop UIDs and GIDs
    --- checking that HadoopVol1 is setup for hadoop workloads...
    ERROR: issues with 1 or more nodes spanned by HadoopVol1
    A suggestion is to re-run the setup_cluster.sh script to ensure that
    all nodes in the cluster are set up correctly for Hadoop workloads.
    See the /var/log/rhs-hadoop-install.log log file for additional info.

2. And again check /etc/fstab record(s) for HadoopVol1:
  # grep HadoopVol1 /etc/fstab 
    NODE1:/HadoopVol1 /mnt/glusterfs//HadoopVol1 glusterfs entry-timeout=0,attribute-timeout=0,use-readdirp=no,_netdev 0 0
    NODE1:/HadoopVol1 /mnt/glusterfs/HadoopVol1 glusterfs entry-timeout=0,attribute-timeout=0,use-readdirp=no,_netdev 0 0


Actual results:
  create_vol.sh doesn't properly process path with trailing slash and enable_vol.sh doesn't properly recognise related fstab line.

Expected results:
  All scripts with path (to some directory) as an argument will properly process path with trailing slash.
  Eventually enable_vol.sh will better recognise related fstab record.

Comment 1 Jeff Vance 2014-11-13 17:50:07 UTC
Remove trailing "/" in setup_cluster brick mount path prefixes, and in create_vol.sh volume mount prefix (and brick mnt prefix).

Comment 4 Daniel Horák 2015-03-10 08:45:56 UTC
Tested and VERIFIED on Red Hat Storage Server 3.0 Update 4 with rhs-hadoop-install-2_44-1.el6rhs.noarch.

# ./create_vol.sh --verbose HadoopVol1 /mnt/glusterfs/ NODE1:/mnt/brick1 NODE2
  ***
  *** create_vol: version 2.44
  ***
  --- determining if HadoopVol1 spans entire storage pool...
  --- done determining if HadoopVol1 spans entire storage pool

  *** Volume        : HadoopVol1
  *** Nodes         : NODE2, NODE1
  *** Volume mount  : /mnt/glusterfs
  *** Brick mounts
        NODE2  : /mnt/brick1 
        NODE1  : /mnt/brick1 

  --- verifying consistent hadoop UIDs and GIDs across nodes...
  --- completed verifying hadoop UIDs and GIDs
  --- checking all nodes spanned by HadoopVol1...
  --- validate NTP time sync across cluster...
  --- done validate NTP time sync across cluster...
  all nodes passed check for hadoop workloads
  Creating new volume HadoopVol1. Continue? [y|N] y
  --- creating the new HadoopVol1 volume...
  --- "HadoopVol1" created
  --- setting performance options on HadoopVol1...
  --- performance options set
  --- starting the new HadoopVol1 volume...
  "HadoopVol1" started
  --- creating glusterfs-fuse mounts for HadoopVol1...
  --- created glusterfs-fuse mounts for HadoopVol1
  --- adding hadoop directories to nodes spanned by HadoopVol1...
  --- added hadoop directories to nodes spanned by HadoopVol1
  "HadoopVol1" created and started with no errors

# grep HadoopVol1 /etc/fstab 
  NODE1:/HadoopVol1 /mnt/glusterfs/HadoopVol1 glusterfs entry-timeout=0,attribute-timeout=0,use-readdirp=no,_netdev 0 0

>> VERIFIED

Comment 6 errata-xmlrpc 2015-03-31 10:18:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0761.html


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