Bug #11328
closed"Name has already been taken" error when importing Puppet classes
Description
Hi,
I added a new class to common and when importing I get all the classes, even the ones I already have in katello.
This is the trace:
ActiveRecord::RecordInvalid
Validation failed: Name has already been taken
app/services/puppet_class_importer.rb:272:in `find_or_create_env'
app/services/puppet_class_importer.rb:192:in `add_classes_to_foreman'
app/services/puppet_class_importer.rb:59:in `block in obsolete_and_new'
app/services/puppet_class_importer.rb:57:in `each'
app/services/puppet_class_importer.rb:57:in `obsolete_and_new'
app/controllers/concerns/foreman/controller/environments.rb:30:in `obsolete_and_new'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
Updated by Dominic Cleal over 9 years ago
- Subject changed from Error importing classes Katello 2.2 to "Name has already been taken" error when importing Puppet classes
- Category set to Puppet integration
Updated by Dominic Cleal about 9 years ago
- Has duplicate Bug #11453: Warning! Validation failed: Name has already been taken added
Updated by Sean O'Keeffe over 8 years ago
- Related to Bug #14339: PuppetClassImporter doesn't respect access control or taxonomies added
Updated by Dominic Cleal over 8 years ago
- Is duplicate of Bug #10906: Puppet environment import returns 500 because it exists in different organization added
Updated by Dominic Cleal over 8 years ago
- Status changed from New to Duplicate
Thanks for the report, we're going to track this under ticket #10906. This appears to be an issue with orgs/locs, where the existing environment isn't assigned to the org/loc that you're currently using - add it to the current org/loc and it should be OK, or perhaps try using Any Context.