Ask Your Question
0

Custom Facts not Storing

asked 2014-04-01 03:31:10 -0500

DevoidX gravatar image

Hi! I have about a dozen custom facts, which until relatively recently were all being stored fine in PuppetDB. I use a curl command from one of my servers to retrieve the whole facts database and produce a simple webpage detailing these over my server estate (~150 linux servers)

About a month ago I noticed that some of these were reporting some of the facts incorrectly. When I log on to these servers and check using 'facter -p' the facts are reporting correctly, yet from the remote server the facts are simply not present. One example is a very simple ... (more)

edit retag flag offensive close merge delete

Comments

On a node with missing facts, can you add a notify { "factname = $factname": } to its manifest to see if the master receives the fact value at all?

ffrank gravatar imageffrank ( 2014-04-03 07:49:18 -0500 )edit

hi - thanks for the reply. sorry, but i'll need a bit of handholding here.. do you mean notify { "factname = $factname": } explicitly, or for my simple example, notify { "mysql_version = $mysql_version ...(more)

DevoidX gravatar imageDevoidX ( 2014-04-03 08:26:20 -0500 )edit

Great. Thanks. mysql_version =... indicates that the master does not in fact bind a value to $mysql_version. Your custom fact is not transmitted correctly. Try enabling debug output on the agent ...(more)

ffrank gravatar imageffrank ( 2014-04-03 08:29:19 -0500 )edit

if i run puppet agent -t on the affected node, i see this: Notice: mysql_version = 5.6.12 Notice: /Stage[main]/Main/Node[brpdecl01]/Notify[mysql_version = 5.6.12]/message ...(more)

DevoidX gravatar imageDevoidX ( 2014-04-03 08:45:43 -0500 )edit

ok, this is getting weirder. starting puppet with 'puppet agent -t' causes the fact to be correctly reported to the master. starting it with our usual way (service puppet start ...(more)

DevoidX gravatar imageDevoidX ( 2014-04-03 09:03:34 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-04-03 10:30:14 -0500

ffrank gravatar image

Your background daemon runs in a mode that is in some way different from 'puppet agent' as launched from the command line.

Things to check

  • environment that is being set in the initscript (or whatever script manages the service)
  • the full command that is launched (as visible in ps output)
edit flag offensive delete link more
0

answered 2014-04-07 07:25:46 -0500

DevoidX gravatar image

Hi - Thanks for the help with this, I have fixed the issue(s) now. It turned out there were two... 1) As you correctly pointed out, checking the environment when puppet ran as a daemon, did not include the path to the mysql install. 2) I also had 2 custom facts which referenced each other, so there was a recursion problem going on. Pre-Facter 2, there was no sign of the error (other than it not working!), post-facter 2 there was an when running 'facter -p'.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-04-01 03:31:10 -0500

Seen: 284 times

Last updated: Apr 07 '14