Hi,
I think I''m having a similar problem to the user who raised this bug:
http://reductivelabs.com/trac/puppet/ticket/733
I''m running 0.23.2 with storeconfigs. I''ve got it working to
the point
where my clients'' facts are being populated in the database[*] but
updates don''t seem to happen unless I restart puppetmasterd. For
example:
1) I run my test client, and its facts go into the DB:
mysql> select n.name,v.* from fact_names n, fact_values v where
n.id=v.fact_name_id and name = ''kernel'';
+--------+----+-------+--------------+---------+---------------------+
| name | id | value | fact_name_id | host_id | updated_at |
+--------+----+-------+--------------+---------+---------------------+
| kernel | 53 | Linux | 87 | 1 | 2008-01-04 10:31:14 |
+--------+----+-------+--------------+---------+---------------------+
2) Leaving puppetmasterd running, I remove this fact from the DB:
mysql> delete from fact_values where id = 53;
Query OK, 1 row affected (0.01 sec)
3) I run puppetd on my client again. The fact doesn''t appear in the DB:
mysql> select n.name,v.* from fact_names n, fact_values v where
n.id=v.fact_name_id and name = ''kernel'';
Empty set (0.00 sec)
4) I restart puppetmasterd, and run puppetd on my client again. The fact
now reappears in the DB:
mysql> select n.name,v.* from fact_names n, fact_values v where
n.id=v.fact_name_id and name = ''kernel'';
+--------+----+-------+--------------+---------+---------------------+
| name | id | value | fact_name_id | host_id | updated_at |
+--------+----+-------+--------------+---------+---------------------+
| kernel | 54 | Linux | 87 | 1 | 2008-01-04 10:34:27 |
+--------+----+-------+--------------+---------+---------------------+
It looks like Puppet::Rails::Host::setfacts only gets run the first time
that a client connects during a puppetmasterd run. Or is there some sort of
limit on how often puppetmasterd will update the database?
I haven''t looked into this very closely yet, but is my expectation of
how
puppet should behave here the correct one?
cheers
Jon
[*] To get storeconfigs to work, I had to undo this change to
ActiveRecord (I''m running 2.0.1):
http://dev.rubyonrails.org/changeset/7511
otherwise I got a "You cannot call create unless the parent is saved"
error.