Bug 1196292 - RFE: change interface of bin/add_dirs.sh script
Summary: RFE: change interface of bin/add_dirs.sh script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhs-hadoop-install
Version: rhgs-3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHGS 3.0.4
Assignee: Jeff Vance
QA Contact: Martin Bukatovic
URL:
Whiteboard:
Depends On:
Blocks: 1182947
TreeView+ depends on / blocked
 
Reported: 2015-02-25 16:10 UTC by Martin Bukatovic
Modified: 2015-05-13 17:52 UTC (History)
9 users (show)

Fixed In Version: 2.44-1
Doc Type: Enhancement
Doc Text:
Now you must use bin/gen_dirs.sh in conjunction with bin/add_dirs.sh to create list of Hadoop directories on the volume.
Clone Of:
Environment:
Last Closed: 2015-03-31 10:18:44 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1196293 0 high CLOSED [Doc] document change of bin/add_dirs script 2021-02-22 00:41:40 UTC
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

Internal Links: 1196293

Description Martin Bukatovic 2015-02-25 16:10:45 UTC
Description of problem
======================

As described in BZ1062401#c19, script bin/add_dirs.sh has been changed:

> As of version 2.35 the syntax of bin/add_dirs.sh changed. The -d|-l|-p option
> has been removed, and instead, add_dirs accepts the directory-prefix (as it
> always has) followed by a list of directory-tuples to add. A dir-tuple is of
> the form "<dirname>:<octal-perms>:<owner>".
>
> Eg.
> bin/add_dirs /mnt/glusterfs dir1:0755:foo dir1/dir2:0775:bar   ...
> or
> bin/add_dirs /mnt/brick1/hadoop $(bin/gen_dirs.sh -l)

Since this script is expected to be executed both indirectly (by the
rhs-hadoop-install scripts themselves) and directly (by admin during Brownfield
use case), this change breaks the user facing interface established in previous
release and so we need to have a BZ for it.

Comment 3 Divya 2015-03-17 10:51:20 UTC
Jeff,

Could you please provide the doc text in the Doc Text field for this bug?

Comment 4 Jeff Vance 2015-03-17 15:55:06 UTC
The bin/add_dirs.sh script has the following syntax:
  add_dir.sh <mount-path> <dir-perm-owner list>

where <mount-path> is the path prefix prepended to the directory names in the dir-perm-owner list. If the mount path is a volume mount then the volume name must be included, eg. /mnt/glusterfs/HadoopVol.

The format of the dir-perm-owner list is:
  <dir>:<octal-permissions>:<owner-name> ...

The <dir> above is appended to <mount-path> and the resulting directory is created with the perms and owner supplied.

Example:
   bin/add_dirs.sh /mnt/glusterfs/HadoopVol mapred:0770:mapred \
                   mapred/system:0755:mapred mr-history:0755:yarn ...

add_dirs.sh should be more commonly used in conjunction with bin/gen_dirs.sh, eg.
   bin/add_dirs.sh /mnt/gluster/HadoopVol \
                   $(bin/gen_dirs.sh -d)

Comment 5 Martin Bukatovic 2015-03-18 15:49:08 UTC
I'm going to compare previous stable version rhs-hadoop-install-2_29-1.el6rhs
with the new version rhs-hadoop-install-2_44-1.el6rhs. Both are expected to
produce the same results (directory name, rights and ownership are checked).

Syntax change
-------------

Here is an example of syntax change for flag '-d':

Old syntax:

    # bin/add_dirs.sh -d /mnt/glusterfs/HadoopVol1

New syntax:

    # bin/add_dirs.sh /mnt/glusterfs/HadoopVol1 $(bin/gen_dirs.sh -d)

Results
-------

flag -d produces the same resutls in both versions
flag -l produces the same resutls in both versions
flag -p produces different resutls, new version doesn't create directory `apps/falcon`
flag -a is not present in previous verion, nothing to compare

Since we don't support Falcon (see eg. BZ 1159157), I'm ok with the results.

Comment 11 errata-xmlrpc 2015-03-31 10:18:44 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.