Project

General

Profile

Actions

Bug #5970

closed

Installing foreman fails when bootdisk is already installed

Added by Justin Sherrill over 10 years ago. Updated over 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

Also available in: Atom PDF