Bug 999820 - Met "Mongoid::Errors::Validations" when creating null domain by oo-admin-ctl-domain
Summary: Met "Mongoid::Errors::Validations" when creating null domain by oo-admin-ctl-...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-22 08:02 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 16:47:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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