Bug 1240716

Summary: Changing hostgroup puppet class or parameter results in error "Operation FAILED: Validation failed: Taxonomy has already been taken"
Product: Red Hat Satellite Reporter: Mahesh Taru <mtaru>
Component: Organizations and LocationsAssignee: Kavita <kgaikwad>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.8CC: mkalyat, ohadlevy, sthirugn, tbrisker, wpinheir
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/13620
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 18:05:13 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 Mahesh Taru 2015-07-07 14:51:59 UTC
Description of problem:
User without administrator permission but having role with appropriate permissions results in error "Operation FAILED: Validation failed: Taxonomy has already been taken" when trying to make changes to hostgroup which is associated to host system.

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

How reproducible:
Not always

Steps to Reproduce:
1. Create host group
2. Associate host with host group
3. Create role with permissions

Host Group 	view_hostgroups, create_hostgroups, edit_hostgroups, destroy_hostgroups 		 	
Host/managed 	view_hosts, create_hosts, edit_hosts, destroy_hosts

Host class 	edit_classes

Almost similar to Manager role.

4. Try to edit the host group and make changes to puppet class & parameters & submit

Actual results:

Fails with error "Operation FAILED: Validation failed: Taxonomy has already been taken".

Expected results:

The changes should get submitted without any error as the required permissions are already granted in assigned role.

Additional info:
Following entries found in production logs:
**********************
Processing by HostgroupsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"lORs7aw1sdLZD/mfq+YSC/A6TVrzpLf0BqdUo2Tm+Ns=", "hostgroup"=>{"name"=>"mosaic-rhel-7-desktop-rolling", "env
ironment_id"=>"6", "content_source_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "puppetclass_ids"=>["", "12", "21", "20", "19", "31", "32", "
10", "18", "26", "22", "16", "15", "11", "2", "8", "9", "30", "23"], "domain_id"=>"1", "subnet_id"=>"", "realm_id"=>"", "architecture_id"=>"1", "operatingsys
tem_id"=>"3", "medium_id"=>"7", "ptable_id"=>"11", "root_pass"=>"[FILTERED]", "lookup_values_attributes"=>"[FILTERED]", "group_parameters_attributes"=>{"0"=>
{"name"=>"kt_activation_keys", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>"", "id"=>"50"}, "1"=>{"name"=>"kt_cv", "value"=>"[FILTERED]", "_destroy
"=>"false", "nested"=>"", "id"=>"53"}, "2"=>{"name"=>"kt_env", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>"", "id"=>"52"}, "3"=>{"name"=>"kt_org",
 "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>"", "id"=>"51"}}, "location_ids"=>["4", ""], "organization_ids"=>["6", ""]}, "kt_environment_id"=>"UNC
C-ENGR/Library", "kt_activation_keys"=>"Mosaic-RHEL-7-Desktop-Rolling-8f10cec", "commit"=>"Submit", "id"=>"14-mosaic-rhel-7-desktop-rolling"}
Operation FAILED: Validation failed: Taxonomy has already been taken
  Rendered common/500.html.erb within layouts/application (5.6ms)
  Rendered layouts/base.html.erb (1.4ms)
Completed 500 Internal Server Error in 328ms (Views: 9.8ms | ActiveRecord: 15.5ms)
***********************

- Re-adding below filters fixed this issue in this case but this is temporary solution.

Host Group 	view_hostgroups, create_hostgroups, edit_hostgroups, destroy_hostgroups 		 	
Host/managed 	view_hosts, create_hosts, edit_hosts, destroy_hosts

Comment 2 RHEL Program Management 2015-07-07 15:04:47 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Brad Buckingham 2016-02-09 14:16:06 UTC
Created redmine issue http://projects.theforeman.org/issues/13620 from this bug

Comment 5 Bryan Kearney 2016-02-09 15:12:41 UTC
Upstream bug component is Multi Org

Comment 9 Satellite Program 2017-01-05 16:09:12 UTC
Upstream bug assigned to kgaikwad

Comment 11 Bryan Kearney 2018-09-04 18:05:13 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable 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.