Bug 999820 - Met "Mongoid::Errors::Validations" when creating null domain by oo-admin-ctl-domain
Met "Mongoid::Errors::Validations" when creating null domain by oo-admin-ctl-...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-22 04:02 EDT by chunchen
Modified: 2016-09-29 22:15 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:47:43 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 chunchen 2013-08-22 04:02:34 EDT
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 14:16:17 EDT
This should be fixed with --> https://github.com/openshift/origin-server/pull/3604
Comment 2 chunchen 2013-09-11 23:10:55 EDT
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.