Fedora Account System
Red Hat Associate
Red Hat Customer
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
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".
It may be sufficient to use --mode=script in the gluster vol create command...
added --mode=script to create_vol's gluster vol create command.
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.
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