Bug 999820

Summary: Met "Mongoid::Errors::Validations" when creating null domain by oo-admin-ctl-domain
Product: OpenShift Online Reporter: chunchen <chunchen>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 16:47:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description chunchen 2013-08-22 08:02:34 UTC
Description of problem:
When creating null domain by oo-admin-ctl-domain, will meet "Mongoid::Errors::Validations" errors

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

How reproducible:
always

Steps to Reproduce:
1. SSH into this instance
2. Create an null domain with new account by oo-admin-ctl-domain
oo-admin-ctl-domain -c create -n '' -l chun

Actual results:
/opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.0.21/lib/mongoid/persistence.rb:310:in `fail_validate!':  (Mongoid::Errors::Validations)
Problem:
  Validation of Domain failed.
Summary:
  The following errors were found: Namespace Invalid namespace. Namespace must only contain alphanumeric characters., Namespace Must be a minimum of 1 and maximum of 16 characters.
Resolution:
  Try persisting the document with valid data or remove the validations.
	from /opt/rh/ruby193/root/usr/share/gems/gems/mongoid-3.0.21/lib/mongoid/persistence.rb:96:in `save!'
	from /usr/sbin/oo-admin-ctl-domain:165:in `<main>'

Expected results:
Should prompt friendly messages for this.

Additional info:

Comment 1 Abhishek Gupta 2013-09-11 18:16:17 UTC
This should be fixed with --> https://github.com/openshift/origin-server/pull/3604

Comment 2 chunchen 2013-09-12 03:10:55 UTC
It's fixed, verified on devenv_3776, please refer to the following results:

# oo-admin-ctl-domain -c create -n '' -l chun
Please provide login and namespace to create the domain