I found what the problem is but I am posting this so hopefully people
don''t scratch their heads when this happens.
I need to be able to configure different things depending whether I''m
running on a system that has a Xen kernel or not. I added a fact in
/var/lib/puppet/facts/
Facter.add("xen_kernel") do
server= `uname -r`
if !server.index(''xen'').nil? then
setcode "yes"
else
setcode "no"
end
end
You already may see what the problem is
# /usr/sbin/puppetd -vt --factsync
warning: Individual config files are deprecated; remove
/etc/puppet/puppetd.conf and use puppet.conf
info: Loading fact xen_kernel
info: Retrieving facts
err: /fact_collector/File[/var/lib/puppet/facts]: Failed to generate
additional resources during transaction: Cannot access mount[facts]
err: /fact_collector/File[/var/lib/puppet/facts]/source: Could not
describe /facts: Cannot access mount[facts]
info: /fact_collector/File[/var/lib/puppet/facts]/source: No specified
sources exist
notice: /fact_collector/File[/var/lib/puppet/facts]/checksum: checksum
changed ''{time}Sat Aug 18 07:00:53 -0400 2007'' to
''{time}Sat Aug 18
07:05:00 -0400 2007''
info: Loading fact xen_kernel
notice: Caught INT; shutting down
notice: Shutting down
Looks good. At that point I do
# /usr/sbin/puppetd --onetime --verbose
warning: Individual config files are deprecated; remove
/etc/puppet/puppetd.conf and use puppet.conf
info: Loading fact xen_kernel
And puppetd sits on that line until it''s killed by the OS since we are
out of memory. If I launch top I can see following
4015 root 25 0 58012 472 400 R 79.3 0.0 0:08.22 yes
3997 root 25 0 620m 553m 2620 R 20.7 29.4 0:02.50 puppetd
What does "yes" do
yes - output a string repeatedly until killed
Oops. Correct code should have said
Facter.add("xen_kernel") do
server= `uname -r`
if !server.index(''xen'').nil? then
setcode { "yes" }
else
setcode { "no" }
end
end
This also may be a "bug" in facter since facter is not limiting the
size
of the string.
On the bright side we had to run memtest on bunch of machines :-) since
at one stage we suspected the memory.
Vladimir