Actions
Bug #9198
closedundefined method `to_enc' for #<Nic::Base:xxx> after migrating from older DB
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>
Updated by Marek Hulán almost 10 years ago
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.
Updated by Marek Hulán almost 10 years ago
- Related to Tracker #2409: Networking added
Updated by The Foreman Bot almost 10 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2134 added
- Pull request deleted (
)
Updated by Marek Hulán almost 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset b328d4c33cbb157250df81278db324273ee59a3c.
Actions