Project

General

Profile

Actions

Bug #495

closed

Facts truncation when using storeconfig and sharing a MySQL DB with puppet

Added by Ludovic LANGE almost 14 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Facts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

I have a Puppet 0.25.5 installation (puppet-0.25.5-1.el5.rpm) and a Foreman 0.1.6 installation (foreman-0.1.6-2.rpm).

Puppet being installed with storeconfig and a MySQL DB, I decided to use a shared installation for the facts, as described in http://theforeman.org/projects/foreman/wiki/Puppet_Facts#Using-Puppet-Storeconfigs

While the resulting process (DB update) did work, and foreman is in a usable state, I noticed an impact on puppet : many facts were being stored truncated to 255 characters. (The net effect was that a lot of hosts were being puppet-modified, as I do deploy on them some SSH keys which are more than 255 characters long).

I think the file : http://theforeman.org/projects/foreman/repository/revisions/master/changes/db/migrate/20100325142616_update_fact_names_and_values_to_bin.rb may be the culprit here, as it seems to change the column "fact_values", from TEXT to a varchar(255).

I modified in the DB the column back to TEXT.

I did not have the ability to check what other impact did this migration procedure have, but I think they should be documented somewhere in the Wiki.
Or at least we should emphasize the fact that there are inherent risks to a shared DB configuration. The current text says : "Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema)."

I think we should also check that the migration procedure is updated to be in real sync with the puppet DB schema, so that no other fields are modified.

I put this as a high priority as it has an impact on existing puppet, and may have unintended consequences.

Actions

Also available in: Atom PDF