Ask Your Question


asked 2015-12-04 05:54:44 -0500

helper gravatar image

I have been trying to use cron job refresh-mcollective-metadata minute attribute value to fqdn_rand(15) but when ever a puppet agent runs, all the agents getting the same value. Is this expected? or Is it something wrong with my version of puppet.

Please can some one advise what is the issue here.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-12-04 12:13:43 -0500

GregLarkin gravatar image

No, this is not the expected behavior according to the function's documentation.

Can you try running this set of commands on a few nodes and report back here with the results?

facter fqdn
puppet apply -e 'notice(fqdn_rand(15))'
edit flag offensive delete link more

answered 2015-12-07 03:44:00 -0500

helper gravatar image

Thanks for coming back on this request. After updating the cron entry as per below. Each agent is getting a radon number.

minute => [fqdn_rand(15, $name)]

But not sure why it is a problem when we don't pass $name to the the argument list returns the same number always for each of the agents.

edit flag offensive delete link more


Did you run the sequence of commands I noted below on a few different machines? Did the 3rd command in the sequence print the same thing on every node? Are you sure the fqdn is different on each machine? What is the value of the variable $name on each host in the example above?

GregLarkin gravatar imageGregLarkin ( 2015-12-08 00:38:16 -0500 )edit

Greg, I have just executed the last command on 2 or 3 nodes they are getting different value. It could be the reason when I ran the command on puppet master and one of the agent node initially got the same result. But the test done on two agents have got different values. Thanks for your response

helper gravatar imagehelper ( 2015-12-08 09:18:41 -0500 )edit

Greg, The command is getting random number on each agent node. When I changed the cron minute attribute under modules/pe_mcollective/manifests/server.pp to fadn_rand(15),fadn_rand(15)+15, then after running puppet agent all agents getting the same value. but by passing $name param agent got right 1

helper gravatar imagehelper ( 2015-12-11 10:10:10 -0500 )edit

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


Asked: 2015-12-04 05:54:44 -0500

Seen: 448 times

Last updated: Dec 07 '15