Project

General

Profile

Actions

Bug #9198

closed

undefined method `to_enc' for #<Nic::Base:xxx> after migrating from older DB

Added by Anonymous over 9 years ago. Updated over 6 years ago.

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

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 open0 closed)

Related to Foreman - Tracker #2409: NetworkingNew

Actions
Actions #1

Updated by Marek Hulán over 9 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.

Actions #2

Updated by Marek Hulán over 9 years ago

  • Status changed from New to Assigned
Actions #3

Updated by Marek Hulán over 9 years ago

Actions #4

Updated by The Foreman Bot over 9 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2134 added
  • Pull request deleted ()
Actions #5

Updated by Marek Hulán over 9 years ago

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

Also available in: Atom PDF