Bug #13620
openChanging hostgroup puppet class or parameter results in error "Operation FAILED: Validation failed: Taxonomy has already been taken"
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1240716
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
Updated by Dominic Cleal almost 9 years ago
- Category set to Organizations and Locations
Updated by Kavita Gaikwad almost 8 years ago
- Assignee set to Kavita Gaikwad
- Target version set to 1.15.6
Updated by Kavita Gaikwad almost 8 years ago
I am not able to reproduce this issue. Do I need to apply all other permissions similar to Manager Role including above Hostgroup, Host/Managed and Host permissions?
Could someone try to reproduce the issue and please let me know observations.
Updated by Kavita Gaikwad almost 8 years ago
- Target version changed from 1.15.6 to 158