Bug 1331163

Summary: Lifecycle Environment Naming Conflict Across Multiple Organizations
Product: Red Hat Satellite Reporter: Dustin Scott <dscott>
Component: Lifecycle EnvironmentsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.6CC: bbuckingham, bkearney, ehelms
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-04 13:19:02 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:

Description Dustin Scott 2016-04-27 19:58:23 UTC
Description of problem:

Scenario:

  - Org1 Lifecycle Environment = Library > Test > Dev > Prod
  - Org2 Lifecycle Environment (None Existing) = Library
  - Add new Lifecycle Environment in Org2 (Test for example)
    - Error in UI: <Test> of environment must be unique within one organization
    - Error in /var/log/foreman/production.log:
      2016-04-27 13:38:09 [I] Processing by Katello::Api::V2::EnvironmentsController#create as JSON
      2016-04-27 13:38:09 [I]   Parameters: {"name"=>"Test", "label"=>"Test", "prior_id"=>"2", "organization_id"=>"3", "api_version"=>"v2", "environment"=>{"name"=>"Test", "label"=>"Test", "prior_id"=>"2"}}
      2016-04-27 13:38:09 [E] ActiveRecord::RecordInvalid
      2016-04-27 13:38:09 [E] name: ["of environment must be unique within one organization"]
      2016-04-27 13:38:09 [E] label: ["of environment must be unique within one organization"]
      2016-04-27 13:38:09 [I] Completed 422 Unprocessable Entity in 245ms (Views: 0.3ms | ActiveRecord: 11.3ms)

    BUG: environment IS unique to the organization, but it is not unique to Satellite.  Does this error message need changed?  Or should I be able to create Test > Dev > Prod as a Lifecycle in multiple Organizations?
    BUG: Lifecycle is created even though the error seems to indicate that it can't be created


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


How reproducible: Intermittent


Steps to Reproduce:
1. Create Lifecycle in Org1 as follows: Library > Test > Dev > Prod
2. Create Lifecycle in Org2 as follows: Library > Test (stop here)
3. UI displays an error that indicates the Lifecycle Environment can't be created (Error = <Test> of environment must be unique within one organization)

Actual results:

-Lifecycle is created, but the error displayed in the UI and the errors in /var/log/foreman/production.log seem to indicate that the creation was unsuccessful


Expected results:

-Lifecycle is created without an error.  The following Lifecycle environments can co-exist:
  - Org1: Library > Test > Dev > Prod
  - Org2: Library > Test > Dev > Prod


Additional info:

Comment 2 Bryan Kearney 2017-08-04 13:19:02 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in product in the forseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.