Project

General

Profile

Actions

Bug #21503

closed

Importing puppet classes fails when switching to different org

Added by Ondřej Pražák over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:
1) Import several puppet classes in context of OrgA
2) Delete one of them
3) Switch context to OrgB
4) Import puppet classes
5) observe the error

 | ActiveRecord::RecordInvalid (Validation failed: Name is already taken):
 |   app/services/puppet_class_importer.rb:333:in `find_or_create_env'
 |   app/services/puppet_class_importer.rb:256:in `add_classes_to_foreman'
 |   app/services/puppet_class_importer.rb:71:in `block in obsolete_and_new'
 |   app/services/puppet_class_importer.rb:69:in `each'
 |   app/services/puppet_class_importer.rb:69:in `obsolete_and_new'
 |   app/controllers/concerns/foreman/controller/environments.rb:41:in `obsolete_and_new'
 |   app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 |   app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 |   app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 |   /home/vagrant/projects/katello/lib/katello/params_parser_wrapper.rb:12:in `call'
 |   lib/middleware/catch_json_parse_errors.rb:8:in `call'
 |   lib/middleware/session_safe_logging.rb:17:in `call'
 |   lib/middleware/tagged_logging.rb:18:in `call'


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #17463: Importing classes for a new org fails when the environment already exist in a different orgClosedOndřej Pražák11/23/2016Actions
Actions #1

Updated by Ondřej Pražák over 6 years ago

  • Related to Bug #17463: Importing classes for a new org fails when the environment already exist in a different org added
Actions #2

Updated by Ondřej Pražák over 6 years ago

  • Bugzilla link set to 1350159
Actions #3

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4963 added
Actions #4

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Daniel Lobato Garcia over 6 years ago

  • translation missing: en.field_release set to 296
Actions

Also available in: Atom PDF