Bug 836177 - error message is not clear when using invalid domain name in rhc setup wizard
error message is not clear when using invalid domain name in rhc setup wizard
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: N. Harrison Ripps
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-28 05:40 EDT by Meng Bo
Modified: 2015-05-14 21:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-13 19:43:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Meng Bo 2012-06-28 05:40:04 EDT
Description of problem:
User without domain exist, using rhc setup, will ask user to create domain first or skip this step. When using invalid domain name in the step, the error message is not meaningful enough.

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

How reproducible:
always

Steps to Reproduce:
1.new user run rhc setup
2.
3.
  
Actual results:
Please enter a namespace or leave this blank if you wish to skip this step:
***
namespace contains non-alphanumeric characters!
Your answer isn't valid (must match #<Proc:0x8a66a8c@/usr/local/share/gems/gems/rhc-0.95.5/lib/rhc/wizard.rb:391 (lambda)>).
?  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
maximum namespace size is 16 characters
Your answer isn't valid (must match #<Proc:0x8a66a8c@/usr/local/share/gems/gems/rhc-0.95.5/lib/rhc/wizard.rb:391 (lambda)>).
?  


Expected results:
The error message should be clear and meaningful.

Additional info:
Comment 1 Clayton Coleman 2012-06-28 09:45:11 EDT
Yikes!
Comment 2 N. Harrison Ripps 2012-07-06 14:59:21 EDT
Our CLI interactions are based on a gem called 'commander', which in turn uses a gem called 'highline' to handle question-and-answer sequences. Highline's default behavior is to show the question's validation rule as part of its error message feedback.

In this case, the validation rule happens to be a Proc, and so the resultant default error message is nonsensical.

I've fixed the problem by setting an understandable response value for the question and providing some formatting cues for good visual presentation. Additionally, I've removed a redundant block of code by adding a condition to the question's 'while' loop.
Comment 3 N. Harrison Ripps 2012-07-09 10:14:16 EDT
Ready for QA.
Comment 4 Meng Bo 2012-07-09 21:52:40 EDT
Verified on rhc-0.95.11, issue fixed.

=============

Please enter a namespace or leave this blank if you wish to skip this step:
%%%
namespace contains non-alphanumeric characters!
The namespace value must contain only letters and/or numbers (A-Za-z0-9):
qwertyuiopwertyuiopqwertyuiop
maximum namespace size is 16 characters
The namespace value must contain only letters and/or numbers (A-Za-z0-9):
jboss

Namespace is not allowed.  Please choose another.
Please enter a namespace or leave this blank if you wish to skip this step:

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