Issue #9225 has been updated by Jason Rojas.
Jacob McCann wrote: > Happened again today. :( So every 2 months about ... I don't think this was ever fixed, I dumped my database schema and converted all INT columns to BIGINT before reloading the schema. I have been doing this for each puppet version that has any database changes really a PITA, luckily the DB schema for stored configs doesn't seem to change much. It looks like stored configs are being deprecated in newer versions of puppet in favor of puppetdb (postgresql doesnt have this issue afaik) and since this ticket isn't assigned to anyone I'm not sure if it's being considered relevant since 3.0 is the current go-to for most. ---------------------------------------- Bug #9225: Stored configs db hits integer limit https://projects.puppetlabs.com/issues/9225#change-77634 Author: Jason Rojas Status: Accepted Priority: High Assignee: Category: stored configuration Target version: 2.7.x Affected Puppet version: 2.6.9 Keywords: bigint database schema Branch: It looks like the default schema for puppet's stored configs (lib/puppet/rails/database/schema.rb) sets `id` columns as int(11) vs using bigint. In my largest puppet environment, I noticed this: Thu Aug 25 15:32:40 -0400 2011 Puppet (err): Mysql::Error: Duplicate entry '2147483647' for key 1: INSERT INTO `fact_values` (`created_at`, `updated_at`, `value`, `fact_name_id`, `host_id`) VALUES('2011-08-25 15:32:40', '2011-08-25 15:32:40', '10.6.0.111', 67, 1716) 2147483647=2^31 which is the 32bit integer limit. Which resulted in these logs on all of my clients in that environment: Aug 26 13:47:26 kickstart-001 puppet-agent[27506]: Could not retrieve catalog from remote server: Error 400 on SERVER: Mysql::Error: Duplicate entry '2147483647' for key 1: INSERT INTO `fact_values` (`created_at`, `updated_at`, `value`, `fact_name_id`, `host_id`) VALUES('2011-08-26 13:47:26', '2011-08-26 13:47:26', '10.6.0.104', 67, 1183) Updating the database schema for stored configs to use bigint for the `id` fields vs int, will help auto increment avoid the issue. I checked the code for 2.7 (since I am running 2.6.9) and it seems to be the same there as well, this could potentially affect the dashboard as well. My immediate work around was to truncate fact_values and set AUTO_INCREMENT=1; But this only will band-aid it until it reaches that point again. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
