Bug 758140

Summary: DB preparation should have an env. prepared for the default org ACME_Corporation
Product: [Retired] Katello Reporter: Garik Khachikyan <gkhachik>
Component: InfrastructureAssignee: Bryan Kearney <bkearney>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 1.0CC: lzap, mkoci
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: 2011-12-08 16:09:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Garik Khachikyan 2011-11-29 12:15:19 UTC
Description of problem:
Recent Katello policy needs to have an org prepared when there is going to be created new org.
But seems that the default "ACME_Corporation" is exception - it does not come with default env. there. Please adjust this.
(one might need to have configured the name of default env for the default org as well)

This issue brings the CLI `repo create` command to get failed with exception:
---
*** ERROR: Organization ACME_Corporation has 'Locker' environment only. Please create an environment for system registration. (400) ***
REQUEST URL: /katello/api/consumers?owner=ACME_Corporation
HttpErrors::BadRequest: Organization ACME_Corporation has 'Locker' environment only. Please create an environment for system registration.
/usr/share/katello/app/controllers/api/systems_controller.rb:182:in `find_only_environment'
---


Version-Release number of selected component (if applicable):
katello-0.1.116-1.el6.x86_64

How reproducible:
always.

Steps to Reproduce:
1. Using CLI create repo on default org (which still have no env. there).
2. 
3.
  
Actual results:
error: "Name or service not known", more details in: /var/log/katello/production.log (see above)

Expected results:
no error, default env should get prepared in the DB init stage during installation.

Additional info:

Comment 1 Garik Khachikyan 2011-11-29 12:20:33 UTC
# COMMENT

Please disregard the log part - it was from another operation.

But we need to have default environment created anyway.


BTW: repo creation without having an env to the org - works!

Comment 2 Lukas Zapletal 2011-12-08 16:09:16 UTC
You are not allowed to register systems in the Locker.

Katello comes without any environment.

The first step is to create an environment. This is documented.

Comment 3 Garik Khachikyan 2011-12-08 16:14:15 UTC
ok, just posting a note:

in UI each org creation have a *must" to prepare an environment.

I was just thinking not to bring ACME_Corporation be *special*