Project

General

Profile

Actions

Bug #14123

closed

Stop associating chef environment as puppet environment in 0.3

Added by Marek Hulán almost 9 years ago. Updated over 6 years ago.

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

Description

Since we have our own model for Chef environments we have to stop associating it to puppet environment relation, otherwise getting following trace

2016-03-09 16:20:01 [app] [W] Action failed
 | ActiveRecord::AssociationTypeMismatch: Environment(#87990400) expected, got ForemanChef::Environment(#84514540)
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/association.rb:216:in `raise_on_type_mismatch!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/belongs_to_association.rb:12:in `replace'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/singular_association.rb:17:in `writer'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/builder/association.rb:118:in `environment='
 | /usr/share/foreman/app/models/host/managed.rb:472:in `populate_fields_from_facts'
 | /usr/share/foreman/app/models/host/base.rb:151:in `import_facts'

Related issues 1 (0 open1 closed)

Related to Chef - Bug #17577: Error 500 when import fact Duplicate12/05/2016Actions
Actions

Also available in: Atom PDF