Bug #9198
closed
undefined method `to_enc' for #<Nic::Base:xxx> after migrating from older DB
Added by Anonymous almost 10 years ago.
Updated over 6 years ago.
Description
As promised here the issue. After migrating the DB for the Nic:Base changes coming with #7456 and friends the following is happening on some hosts when requesting the Puppet YAML:
Processing by HostsController#externalNodes as YML
Parameters: {"name"=>"katello-centos7.example.com"}
Failed to generate external nodes for katello-centos7.example.com with undefined method `to_enc' for #<Nic::Base:0x007f17293b07a8>
Related issues
1 (1 open — 0 closed)
As a quick fix, one may manually change interface type in DB to Nic::Managed, from foreman console, something like this may help
Nic::Base.where(:type => ['Nic::Base', nil]).all.each {|n| n.type = 'Nic::Managed'; n.save!}
We'll have to fix the migration, I suspect STI classes are not loaded so STI is ignored. Thanks Michael for reporting.
- Status changed from New to Assigned
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2134 added
- Pull request deleted (
)
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF