Project

General

Profile

Actions

Bug #10906

open

Puppet environment import returns 500 because it exists in different organization

Added by Tom Zven over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Organizations and Locations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi,

I have a problem adding or importing new puppet environments in Foreman 1.8.2.

After installing foreman i went to "Puppet classes" and imported the classes from puppetmaster.host.com. This was succesfull and i can see the classes and the environments that they are in (e.g.):

abrt development management production 0 18 0

The problem appears when i try to add a new puppet environment (e.g. development) under Configure->Environments. This fails with "Name has already been taken". I don't see the environment there and I can't assign hosts to it. Import Environments from puppetmaster.host.com also fails.

Warning!
Validation failed: Name has already been taken

If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
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'

Is this an expected behaviour and I should try try importing environments first and then classes?

Related issues 4 (1 open3 closed)

Related to Foreman - Bug #14339: PuppetClassImporter doesn't respect access control or taxonomiesNew03/23/2016Actions
Has duplicate Foreman - Bug #11328: "Name has already been taken" error when importing Puppet classesDuplicate08/11/2015Actions
Has duplicate Foreman - Bug #12048: Unable to import puppet environment "production" via foreman web interfaceDuplicate10/02/2015Actions
Has duplicate Foreman - Bug #14710: After upgrading from 1.8 to 1.10 I have problems importing puppet classes Duplicate04/19/2016Actions
Actions

Also available in: Atom PDF