Project

General

Profile

Bug #11328

"Name has already been taken" error when importing Puppet classes

Added by Juan Pablo Lorier almost 5 years ago. Updated about 4 years ago.

Status:
Duplicate
Priority:
High
Assignee:
-
Category:
Puppet integration
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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'


Related issues

Related to Foreman - Bug #14339: PuppetClassImporter doesn't respect access control or taxonomiesNew2016-03-23
Has duplicate Foreman - Bug #11453: Warning! Validation failed: Name has already been takenDuplicate2015-08-23
Is duplicate of Foreman - Bug #10906: Puppet environment import returns 500 because it exists in different organizationNew2015-06-23

History

#1 Updated by Dominic Cleal almost 5 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

#2 Updated by Dominic Cleal almost 5 years ago

  • Has duplicate Bug #11453: Warning! Validation failed: Name has already been taken added

#3 Updated by Sean O'Keeffe over 4 years ago

  • Related to Bug #14339: PuppetClassImporter doesn't respect access control or taxonomies added

#4 Updated by Dominic Cleal about 4 years ago

  • Is duplicate of Bug #10906: Puppet environment import returns 500 because it exists in different organization added

#5 Updated by Dominic Cleal about 4 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.

Also available in: Atom PDF