Bug 1080241 - rhs-hadoop-install deletes files in the gluster volume and the volume itself.
Summary: rhs-hadoop-install deletes files in the gluster volume and the volume itself.
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: Release Candidate
: ---
Assignee: Jeff Vance
QA Contact: Martin Bukatovic
URL:
Whiteboard:
Depends On:
Blocks: 1159155
TreeView+ depends on / blocked
 
Reported: 2014-03-25 02:20 UTC by Jeff Vance
Modified: 2014-11-24 11:54 UTC (History)
9 users (show)

Fixed In Version: 0.82-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-24 11:54:15 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:1275 0 normal SHIPPED_LIVE Red Hat Storage Server 3 Hadoop plug-in enhancement update 2014-11-24 16:53:36 UTC

Description Jeff Vance 2014-03-25 02:20:44 UTC
Description of problem:
Do not remove files in a gluster volume, nor remove the volume, nor detach the truster pool. This is too dangerous for HTB and GA.

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


How reproducible:
100%

Steps to Reproduce:
1. ./install.sh /dev/<brick-dev>
2. prompted to delete files/vol -- answer yes
3. files/vol are gone until setup() re-creates the vol.

Actual results:


Expected results:


Additional info:

Comment 2 Jeff Vance 2014-03-25 05:30:07 UTC
With this fix the cleanup() function is no longer executed in the standard workflow of the script. Therefore, the user must ensure that the brick is unmounted, etc before running ./install.sh. The undocumented --clean option remains and, if specified, regardless of the -y setting, the user is prompted TWICE to confirm the deletes.

Fixed in 0.79-1. Build id: https://brewweb.devel.redhat.com//buildinfo?buildID=345653

Comment 3 Martin Bukatovic 2014-03-26 15:46:11 UTC
(In reply to Jeff Vance from comment #2)
> The undocumented --clean option
> remains and, if specified, regardless of the -y setting, the user is
> prompted TWICE to confirm the deletes.

I don't understand why we would like to leave this undocumented. Could you elaborate?

Comment 4 Martin Bukatovic 2014-03-26 15:50:45 UTC
Trying on RHSS-2.1.bd-20140219.n.0 with latest rhs-hadoop-install from brew:

rhs-hadoop-install-0_79-1.el6rhs.noarch

Running the installer for the first time (which works fine):

~~~
./install.sh /dev/mapper/TestVolume002-export_bricks
~~~

Then trying to rerun the same command again: which fails with:

~~~
----------------------------------------
--    Begin cluster configuration     --
----------------------------------------


-- Setting up brick and volume mounts, creating and starting volume
  -- on all nodes:
       mkfs.xfs on brick-device
       mkdir /mnt/brick1, /mnt/glusterfs and /mnt/brick1/mapredlocal...
       append mount entries to /etc/fstab...
       mount /mnt/brick1...
On mrg-qe-vm-c4-402.lab.eng.brq.redhat.com:
ERROR: mrg-qe-vm-c4-402.lab.eng.brq.redhat.com: mkfs.xfs on brick /dev/RHS_vg1/RHS_lv1: mkfs.xfs: /dev/RHS_vg1/RHS_lv1 contains a mounted filesystem
Usage: mkfs.xfs
/* blocksize */         [-b log=n|size=num]
/* data subvol */       [-d agcount=n,agsize=n,file,name=xxx,size=num,
                            (sunit=value,swidth=value|su=num,sw=num),
                            sectlog=n|sectsize=num
/* inode size */        [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2,
                            projid32bit=0|1]
/* log subvol */        [-l agnum=n,internal,size=num,logdev=xxx,version=n
                            sunit=value|su=num,sectlog=n|sectsize=num,
                            lazy-count=0|1]
/* label */             [-L label (maximum 12 characters)]
/* naming */            [-n log=n|size=num,version=2|ci]
/* prototype file */    [-p fname]
/* quiet */             [-q]
/* realtime subvol */   [-r extsize=num,size=num,rtdev=xxx]
/* sectorsize */        [-s log=n|size=num]
/* version */           [-V]
                        devicename
<devicename> is required unless -d name=xxx is given.
<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
      xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
<value> is xxx (512 byte blocks).
~~~

Which is expected behaviour: nothing happens when the volume is already mounted

But I have a problem with the message which installer shows in the end of
successful volume setup:

~~~
**** This script can be re-run anytime! ****
~~~

Since this change conflicts this message, could you remove it?

>>> ASSIGNED

Comment 6 Jeff Vance 2014-03-26 16:17:11 UTC
There are several undocumented options to install.sh: --clean, --setup, --mkdirs, --vol, --users, --perf. In the next version --_prep will be added, and the list above was going to be renamed to: --_clean, --_setup, --_hadoop-dirs, --_vol, --_users, --_perf to make these options less likely to be accidentally invoked.

Reason for undocumented: 1) I used these options in complex debugging cases, 2) they had minimal testing, 3) I don't want to place extra burden on QE and extra effort in documentation (probably just the readme file), 4) some of these options can be seen as hard-to-use, eg. --mkdirs, which creates the hadoop-specific dirs, requires the volume to be set up first, ie use --vol first.

I am willing to doc these options (and not change the names to --_xxxx) if QE recommends that action.

Comment 7 Martin Bukatovic 2014-03-27 16:51:11 UTC
(In reply to Jeff Vance from comment #6)
> There are several undocumented options to install.sh: --clean, --setup,
> --mkdirs, --vol, --users, --perf. In the next version --_prep will be added,
> and the list above was going to be renamed to: --_clean, --_setup,
> --_hadoop-dirs, --_vol, --_users, --_perf to make these options less likely
> to be accidentally invoked.
> 
> Reason for undocumented: 1) I used these options in complex debugging cases,
> 2) they had minimal testing, 3) I don't want to place extra burden on QE and
> extra effort in documentation (probably just the readme file), 4) some of
> these options can be seen as hard-to-use, eg. --mkdirs, which creates the
> hadoop-specific dirs, requires the volume to be set up first, ie use --vol
> first.
> 
> I am willing to doc these options (and not change the names to --_xxxx) if
> QE recommends that action.

I see your point and don't like additional complexity as well. I would rather
see devel-only options completely disabled though ... (this is not a request to implement it right now, because we would need which options should be disabled ...).

Speaking about the --mkdirs function, I believe this should be in dedicated script as described in BZ 1062401.

Comment 8 Jeff Vance 2014-03-31 16:38:28 UTC
See also BZ 1082695.

Comment 9 Jeff Vance 2014-03-31 18:45:07 UTC
Fixed: https://brewweb.devel.redhat.com//buildinfo?buildID=347151

Comment 10 Anush Shetty 2014-04-07 10:18:30 UTC
Just tried with 0.85 and looks like it is fixed now.

Comment 12 errata-xmlrpc 2014-11-24 11:54:15 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-2014-1275.html


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