Project

General

Profile

Actions

Bug #17999

closed

Fact values id exceeds mysql maximum

Added by Timo Goebel over 7 years ago. Updated over 7 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The id column of the fact_values has a maximum of SIGNED INT (can support till 2147483647).

This leads to a lot of nice errors, when you hit the limit and breaks discovery host import.

Fact lldp_neighbor_mngaddr_ipv4_p5p1 could not be imported because of Mysql2::Error: Out of range value for column 'id' at row 1: INSERT INTO `fact_values` (`value`, `fact_name_id`, `host_id`, `created_at`, `updated_at`) VALUES ('192.168.200.14', 121854, 14343, '2017-01-10 09:37:26', '2017-01-10 09:37:26')

A quick fix is changing the id column from signed to unsigned. We might want to add a migration for this to make this a default.
UNSIGNED INT allows the double of SIGNED INT.

ALTER TABLE `fact_values` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #13810: Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table)ClosedTimo Goebel02/19/2016Actions
Actions #1

Updated by Dominic Cleal over 7 years ago

  • Is duplicate of Bug #13810: Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table) added
Actions #2

Updated by Dominic Cleal over 7 years ago

  • Status changed from New to Duplicate

I think this can be covered under #13810 - though initially about the 'logs' table, 'reports' and 'fact_values' are in linked tickets and can be fixed together.

Actions

Also available in: Atom PDF