Project

General

Profile

Actions

Bug #5970

closed

Installing foreman fails when bootdisk is already installed

Added by Justin Sherrill almost 10 years ago. Updated almost 6 years ago.

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

Description

When installing foreman if the bootdisk gem/package is already installed prior to the installation script being run the initial migration will fail.

The reason being is that this commit:

https://github.com/theforeman/foreman_bootdisk/commit/4cdc72e0823f5e8caf0304319592fd2efdbcec83#diff-b9eb6b264b8b4855a4d54eef890dc45dR5

references the Setting class, yet if the migration is being run with an empty database the Setting class will fail to load properly.

The cause of this is that line 21 of the Setting class includes:

audited :only => [:value], :on => [:update], :allow_mass_assignment => true

which internally within the audited Gem calls self.column_names. Since the table has not been created yet this fails and active record captures the traceback so the rest of the class (after line 21 does not get executed).

Actions #1

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Closed
  • Assignee set to Dominic Cleal
  • Target version set to 1.8.2
  • % Done changed from 0 to 100

Fixed in b500d4e4acb9ee7ae8cd1395d6cab7a65b7a24b1 and bootdisk 2.0.8.

I was able to reproduce by manually hacking away most of the settings model, but remain unable to reproduce it in a plain DB migration on a clean slate. Very strange!

Actions

Also available in: Atom PDF