Project

General

Profile

Actions

Bug #21037

closed

"Invalid single-table inheritance type: Host::Discovered is not a subclass of Host::Managed" caused by auditing host

Added by Ivan Necas about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

In the host auditing, we're setting the auditable_class to Host. And in the Host, we're redirecting
all the methods to the Host::Managed. This causes issues, when converting the host from discovered
to managed and creating an audit record of it.

Reproducer (having a discovered host).

host2 = host.become(Host::Managed)
host2.type = "Host::Managed" 
host2.save

Related issues 3 (0 open3 closed)

Related to Discovery - Bug #20972: STI issues with Host::Discovered on Rails 5Duplicate09/17/2017Actions
Related to Foreman - Bug #25207: Invalid single-table inheritance type: Host::Discovered is not a subclass of Host::ManagedClosedLukas ZapletalActions
Related to Discovery - Bug #25556: 'Discovery manager' role brokenDuplicateActions
Actions

Also available in: Atom PDF