Bug 1166712 - Error and prompt not displayed when running create_volume.sh script and trying to use multiple bricks from one node to volume.
Summary: Error and prompt not displayed when running create_volume.sh script and tryin...
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
unspecified
Target Milestone: ---
: RHGS 3.0.4
Assignee: Jeff Vance
QA Contact: Ondřej Komárek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-21 14:17 UTC by Ondřej Komárek
Modified: 2015-07-13 04:18 UTC (History)
7 users (show)

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


Attachments (Terms of Use)
Three script runs. First (from top): stuck on second prompt without showing any text. Second: Hitted enter on second prompt. Third: entered y and pressed enter - setup completed, but no text was shown (126.53 KB, image/png)
2014-11-21 14:17 UTC, Ondřej Komárek
no flags Details


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 Ondřej Komárek 2014-11-21 14:17:21 UTC
Created attachment 959759 [details]
Three script runs. First (from top): stuck on second prompt without showing any text. Second: Hitted enter on second prompt. Third: entered y and pressed enter - setup completed, but no text was shown

Description of problem:
When trying to setup new volume with create_volume.sh with specific parameters, one of prompt text is not shown. See Steps to Reproduce.


Version-Release number of selected component (if applicable):
rhs-hadoop-install-2_29-1.el6rhs.noarch
rhs-hadoop-2.3.3-3.el6rhs.noarch
glusterfs-3.6.0.30-1.el6rhs.x86_64


How reproducible:
100%, but only with creation first volume. When script failed to create first volume, I was able to reproduce it every time again. After successful volume creation, I was not able to reproduce with same pattern (but obviously new volume name and mount point, because script do not let us create same volume again).


Steps to Reproduce:

I used 4 servers - 1 MASTER node, 1 MANAGEMENT node and 2 datanodes.

When I tried to create first volume, I used create_vol.sh script:

./create_vol.sh HadoopVol1 /mnt/glusterfs/HadoopVol1 node1:/mnt/brick1/HadoopVol1 node1:/mnt/brick2/HadoopVol1 mrg-qe-node2:/mnt/brick1/HadoopVol1 node2:/mnt/brick2/HadoopVol1

Then, prompt showed up:

Creating new volume HadoopVol2. Continue? [y|N]

I hit y, enter and waited. Nothing else showed up for long time. When I pressed enter again, error message showed up:

ERROR 255: gluster vol create HadoopVol1 /mnt/glusterfs/HadoopVol1 node1:/mnt/brick1/HadoopVol1 node1:/mnt/brick2/HadoopVol1 mrg-qe-node2:/mnt/brick1/HadoopVol1 node2:/mnt/brick2/HadoopVol1 : Multiple bricks of a replicate volume are present on the same server. This setup is not optimal.
Do you still want to continue creating the volume? (y/n) Invalid input, please enter y/n
Volume create failed.

Problem is, that this second prompt text was not visible before input from user was expected.

When I typed y or n on second non-visible prompt, everything was working as expected except prompt text was never shown. 


Actual results:
Second prompt text is not visible and user thinks, that script is doing something, but it is waiting for user to decide.


Expected results:
There will be printed prompt text before actually expecting user to hit answer.


Additional info:
I found BZ with similar problem. Main difference is, that this problem is related to creating new volume, not to adding new nodes to existing one.
https://bugzilla.redhat.com/show_bug.cgi?id=960954

Comment 2 Jeff Vance 2014-11-21 17:26:14 UTC
The second prompt is coming from the gluster cli but the cli output has been redirected by the script (and is done over ssh), so the user cannot see it. I will investigate better up-front error detection to reduce the chances of this happening but the chance will not be zero. I believe that allowing the user to interact with the gluster cli directly (as is the case in this BZ) will be difficult to solve.

Also note: the volume mount prefix path used is likely not what you wanted. See --help. My guess is that the 2nd arg to create_vol.sh should have been just "/mnt/glusterfs".

Comment 3 Jeff Vance 2014-11-22 01:08:37 UTC
It may be sufficient to use --mode=script in the gluster vol create command...

Comment 4 Jeff Vance 2014-11-22 02:06:52 UTC
added --mode=script to create_vol's gluster vol create command.

Comment 7 Ondřej Komárek 2015-03-11 14:46:43 UTC
Tested with:
create_vol: version 2.44

rhs-hadoop-2.3.3-3.el6rhs.noarch
hadoop-2.4.0.2.1.7.0-784.el6.x86_64
glusterfs-3.6.0.42.1-1.el6rhs.x86_64

Tested as written on description, error is not present now ->VERIFIED.

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