jpruitt@juniper.net
2008-Apr-05 23:53 UTC
[Puppet Users] Getting MySQL error: Unknown column ''fact_values.host_id''
The following mysql error is showing up in the debug output of my
puppetmasterd daemon:
err: Could not store configs: Mysql::Error: Unknown column
''fact_values.host_id'' in ''where clause'':
SELECT `fact_values`.`id` AS
t0_r0, `fact_values`.`value` AS t0_r1, `fact_values`.`fact_name_id` AS
t0_r2, `fact_values`.`updated_at` AS t0_r3, `fact_names`.`id` AS
t1_r0, `fact_names`.`name` AS t1_r1, `fact_names`.`host_id` AS t1_r2,
`fact_names`.`updated_at` AS t1_r3 FROM `fact_values` LEFT OUTER JOIN
`fact_names` ON `fact_names`.id = `fact_values`.fact_name_id WHERE
(fact_values.host_id = 21)
Here''s the output of "describe fact_values" in mysql:
mysql> describe fact_values\G
*************************** 1. row ***************************
Field: id
Type: int(11)
Null: NO
Key: PRI
Default: NULL
Extra: auto_increment
*************************** 2. row ***************************
Field: value
Type: text
Null: NO
Key:
Default:
Extra:
*************************** 3. row ***************************
Field: fact_name_id
Type: int(11)
Null: NO
Key:
Default:
Extra:
*************************** 4. row ***************************
Field: updated_at
Type: datetime
Null: YES
Key:
Default: NULL
Extra:
4 rows in set (0.00 sec)
mysql>
Probably due to massive user error :) but, any ideas? Perhaps an
upgrade of puppetmaster somewhere along the way required a db:migrate
to realize some new db attributes?
- Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Blake Barnett
2008-Apr-06 00:06 UTC
[Puppet Users] Re: Getting MySQL error: Unknown column ''fact_values.host_id''
On Apr 5, 2008, at 4:53 PM, jpruitt@juniper.net wrote:> > The following mysql error is showing up in the debug output of my > puppetmasterd daemon: > > err: Could not store configs: Mysql::Error: Unknown column > ''fact_values.host_id'' in ''where clause'': SELECT `fact_values`.`id` AS > t0_r0, `fact_values`.`value` AS t0_r1, `fact_values`.`fact_name_id` AS > t0_r2, `fact_values`.`updated_at` AS t0_r3, `fact_names`.`id` AS > t1_r0, `fact_names`.`name` AS t1_r1, `fact_names`.`host_id` AS t1_r2, > `fact_names`.`updated_at` AS t1_r3 FROM `fact_values` LEFT OUTER JOIN > `fact_names` ON `fact_names`.id = `fact_values`.fact_name_id WHERE > (fact_values.host_id = 21)Yeah, this was a schema change that didn''t get put into migrations because it was a significant refactoring. There were very few people using storeconfigs at the time too. Basically the solution is to just drop the database and recreate it. All the information will get repopulated. -Blake --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
jpruitt@juniper.net
2008-Apr-06 06:28 UTC
[Puppet Users] Re: Getting MySQL error: Unknown column ''fact_values.host_id''
Thanks, that did the trick! On Apr 5, 5:06 pm, Blake Barnett <sha...@gmail.com> wrote:> On Apr 5, 2008, at 4:53 PM, jpru...@juniper.net wrote: > > > > > The following mysql error is showing up in the debug output of my > > puppetmasterd daemon: > > > err: Could not store configs: Mysql::Error: Unknown column > > ''fact_values.host_id'' in ''where clause'': SELECT `fact_values`.`id` AS > > t0_r0, `fact_values`.`value` AS t0_r1, `fact_values`.`fact_name_id` AS > > t0_r2, `fact_values`.`updated_at` AS t0_r3, `fact_names`.`id` AS > > t1_r0, `fact_names`.`name` AS t1_r1, `fact_names`.`host_id` AS t1_r2, > > `fact_names`.`updated_at` AS t1_r3 FROM `fact_values` LEFT OUTER JOIN > > `fact_names` ON `fact_names`.id = `fact_values`.fact_name_id WHERE > > (fact_values.host_id = 21) > > Yeah, this was a schema change that didn''t get put into migrations > because it was a significant refactoring. There were very few people > using storeconfigs at the time too. > > Basically the solution is to just drop the database and recreate it. > All the information will get repopulated. > > -Blake--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---