Project

General

Profile

Actions

Bug #24108

closed

Unknown column 'fact_names.name' - uploading reports fails due to missing table

Added by Ben Howell about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Foreman Integration
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I've observed this behavior in both MySQL and Postgres. The table fact_names does not get created and the report uploader errors out when trying to enter it into the database. I have not tested it on any other database.

2018-06-28T16:08:47 fd9d964e [app] [I] Started POST "/api/hosts/facts" for 192.168.1.239 at 2018-06-28 16:08:47 +0000
2018-06-28T16:08:47 fd9d964e [app] [I] Processing by Api::V2::HostsController#facts as JSON
2018-06-28T16:08:47 fd9d964e [app] [I]   Parameters: {"name"=>"foreman-rutabaga.thecitybase.net", "facts"=>"[FILTERED]", "apiv"=>"v2", "host"=>{"name"=>"foreman-rutabaga.thecitybase.net"}}
2018-06-28T16:08:47 fd9d964e [app] [I] Current user: foreman_api_admin (administrator)
2018-06-28T16:08:47 fd9d964e [audit] [I] [foreman-rutabaga.thecitybase.net] deleted 0 (6.3ms)
2018-06-28T16:08:47 fd9d964e [audit] [I] [foreman-rutabaga.thecitybase.net] updated 0 (4.8ms)
2018-06-28T16:08:47 fd9d964e [app] [W] Action failed
 | ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'fact_names.name' in 'field list': SELECT fact_names.name FROM `fact_values` WHERE `fact_values`.`host_id` = 2 AND `fact_values`.`fact_name_id` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 84, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203)
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'

This appears immediately following a state.highstate using the "Run Salt" command.

Foreman 1.17.1, Foreman Salt 10.0.

Actions

Also available in: Atom PDF