Project

General

Profile

Actions

Bug #22997

open

Puppet facts import fails for fact names (e.g. mount points) greater than 255 characters

Added by Douglas Temple about 6 years ago. Updated over 4 years ago.

Status:
Ready For Testing
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Hello,

We started to use Foreman on our cluster that uses DC/OS and found an issue where the fact importer in Foreman was rejecting some of the facts. We investigated and found that it was due to ActiveRecord's default length for a string (255 characters) being too small for some of the 'name' fields being stored in the 'fact_names' table.

An example of one of our mount points that breaks this 255 character limit for the fact name is:
'mountpoints::/var/lib/mesos/slave/slaves/8b44271e-4f05-4caa-8faf-f200c214bd4a-S236/frameworks/8b44271e-4f05-4caa-8faf-f200c214bd4a-0045/executors/kafka__3b71c0c0-b529-4786-9479-f69304e9dda2/runs/2aa2aacf-e83b-45a1-a4ab-105d927a5435/grapes-kafka-broker-data::device'

Upon altering the DB directly and changing the 'fact_name' model it successfully imported the facts from these machines.

We have a patch with a potential solution, though the increase in field size is substantial (255 to 4096) which may (or may not, I'm not knowledgeable enough about databases) have an impact on the performance of the backing database. Perhaps someone can chime in with a potentially more reasonable value?

Actions #1

Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5351 added
Actions

Also available in: Atom PDF