fact loads: I use facter to search the rsync path and then i write this sudoers line: Cmnd_Alias BACKUPCOMMANDS = /usr/bin/rsync I call puppet like this: puppetd --factsync --server=xxx.yyy.61.131 --waitforcert 60 --test the recipe is: sudoensure_line { sudobackupcommands: ligne => "Cmnd_Alias BACKUPCOMMANDS = $rsyncpath", before => sudoensure_line["sudoaqbackup"] } sudoensure_line { sudoaqbackup: ligne => "aqbackup ALL = NOPASSWD: BACKUPCOMMANDS" } after two run of puppetd i end like this : Cmnd_Alias BACKUPCOMMANDS aqbackup ALL = NOPASSWD: BACKUPCOMMANDS Cmnd_Alias BACKUPCOMMANDS = /usr/bin/rsync and this is bad(tm) ;) should i add , onlyif => "echo $rsyncpath" for this to work only on the second run ? Any idea of where is the mistake ? I perhaps assume too much about the order of puppet execution or perhaps retreivedd fact are not loaded by puppet on the run they are retreived ? facter 1.3.4 puppet .19.3 thanks for the help :) -- Cordialement, Ghislain _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Adnet Ghislain wrote:> fact loads: > > > I use facter to search the rsync path and then i write this sudoers line: > > Cmnd_Alias BACKUPCOMMANDS = /usr/bin/rsync > > > I call puppet like this: > > puppetd --factsync --server=xxx.yyy.61.131 --waitforcert 60 --testOkay.> the recipe is: > > sudoensure_line { sudobackupcommands: > ligne => "Cmnd_Alias BACKUPCOMMANDS = > $rsyncpath", > before => sudoensure_line["sudoaqbackup"] > } > sudoensure_line { sudoaqbackup: > ligne => "aqbackup ALL = NOPASSWD: > BACKUPCOMMANDS" > } > > > after two run of puppetd i end like this : > > > Cmnd_Alias BACKUPCOMMANDS > aqbackup ALL = NOPASSWD: BACKUPCOMMANDS > Cmnd_Alias BACKUPCOMMANDS = /usr/bin/rsync > > and this is bad(tm) ;)Yes, definitely bad.> should i add , > onlyif => "echo $rsyncpath" > > for this to work only on the second run ? > > Any idea of where is the mistake ? I perhaps assume too much about the > order of puppet execution or perhaps retreivedd fact are not loaded by > puppet on the run they are retreived ? > > facter 1.3.4 > puppet .19.3I just tested this again locally, since the whole point of factsync is that the facts get loaded before the config gets compiled, and it works fine for me. Can you post your client logs? You should see messages about downloading and loading facts before the ''Caching configuration'' message. Do you? -- I have an answering machine in my car. It says, "I''m home now. But leave a message and I''ll call when I''m out. -- Stephen Wright --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
i think i found the problem. When does the fact gets loaded, before puppet check for the directoryes it use or after ? It happen on the first run and i run with path for puppet that does not exist (puppet create them at first run ) but i wonder if there is not a probleme because of this. I just tried on another box creating the directory before and it worked. I am pretty sure that the fact load was the first thing done and i had two time the lsb error messages meanning that the fact were run 2 times. Cordialement, Ghislain> > I just tested this again locally, since the whole point of factsync is > that the facts get loaded before the config gets compiled, and it works > fine for me. > > Can you post your client logs? You should see messages about > downloading and loading facts before the ''Caching configuration'' > message. Do you? > >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
debug: Loaded state in 0.02 seconds info: Retrieving facts debug: Calling fileserver.describe debug: Calling fileserver.list debug: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts: Changing checksum,mode debug: Calling fileserver.describe debug: Calling fileserver.list debug: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts/local.rb: Creating checksum {md5}ebb0e7db802c506bdcc054b48f95f311 debug: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts: 2 change(s) debug: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts/checksum: Replacing /usr/local/.aqadmin/puppet/var/facts checksum {time}Sun Oct 01 13:30:33 +0200 2006 with {time}Sun Oct 01 17:08:49 +0200 2006 notice: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts/checksum: checksum changed ''{time}Sun Oct 01 13:30:33 +0200 2006'' to ''{time}Sun Oct 01 17:08:49 +0200 2006'' notice: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts/mode: mode changed ''700'' to ''755'' debug: Finishing transaction 76696960 with 2 changes debug: Calling puppetmaster.getconfig err: Could not retrieve configuration: Unknown class in file /etc/puppet/manifests/./nodes/vpsv2nodes.pp at line 32 warning: Not using cache on failed configuration here is the debug message i got on another box, the facts are here but they sems to be not loaded :( The class name depend of a fact so it fails saying that the class does not exist. Cordialement, Ghislain> > I just tested this again locally, since the whole point of factsync is > that the facts get loaded before the config gets compiled, and it works > fine for me. > > Can you post your client logs? You should see messages about > downloading and loading facts before the ''Caching configuration'' > message. Do you? > >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
If i copy the local.rb file from where puppet download it and put it in a ffacter dir on ruby path then it works. I use this command to initialize the beast: mkdir -m 700 -p /usr/local/.aqadmin/puppet/conf/ssl; \ mkdir -m 700 -p /usr/local/.aqadmin/puppet/var/facts; \ mkdir -m 700 -p /usr/local/.aqadmin/puppet/log; \ mkdir -m 700 -p /usr/local/.aqadmin/puppet/run; \ mkdir -m 700 -p /usr/local/.aqadmin/puppet/state; \ puppetd --confdir=/usr/local/.aqadmin/puppet/conf \ --logdir=/usr/local/.aqadmin/puppet/log \ --rundir=/usr/local/.aqadmin/puppet/run \ --statedir=/usr/local/.aqadmin/puppet/state \ --lockdir=/usr/local/.aqadmin/puppet/run \ --vardir=/usr/local/.aqadmin/puppet/var --factsync \ --server=xxx.xxx.xxx.xxx --waitforcert 60 --test Cordialement, Ghislain> > I just tested this again locally, since the whole point of factsync is > that the facts get loaded before the config gets compiled, and it works > fine for me. > > Can you post your client logs? You should see messages about > downloading and loading facts before the ''Caching configuration'' > message. Do you? > >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Adnet Ghislain wrote:> i think i found the problem. When does the fact gets loaded, before > puppet check for the directoryes it use or after ? It happen on the > first run and i run with path for puppet that does not exist (puppet > create them at first run ) but i wonder if there is not a probleme > because of this. I just tried on another box creating the directory > before and it worked. > > I am pretty sure that the fact load was the first thing done and i had > two time the lsb error messages meanning that the fact were run 2 times.I just tested this by removing my facts directory entirely, and it works fine. Any other ideas? -- I can win an argument on any topic, against any opponent. People know this, and steer clear of me at parties. Often, as a sign of their great respect, they don''t even invite me. -- Dave Barry --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
ok i reproduced it ! you have to : install puppetd run puppetd sign the cert it runs but does not exist in a nodes definition => info: Retrieving facts notice: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts/mode: mode changed ''700'' to ''755'' err: Could not retrieve configuration: Unknown class in file /etc/puppet/manifests/./nodes/vpsv2nodes.pp at line 34 warning: Not using cache on failed configuration Now, add the host to your node definition and BOOM it does not work anymore you have to remove the downloaded fact and restart to make it work again :) Cordialement, Ghislain>> I am pretty sure that the fact load was the first thing done and i had >> two time the lsb error messages meanning that the fact were run 2 times. >> > > I just tested this by removing my facts directory entirely, and it works > fine. Any other ideas? > >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Adnet Ghislain wrote:> ok i reproduced it ! > > you have to : > > install puppetd > run puppetd > sign the cert > it runs but does not exist in a nodes definition => > info: Retrieving facts > notice: fact_collector/file=/usr/local/.aqadmin/puppet/var/facts/mode: > mode changed ''700'' to ''755'' > err: Could not retrieve configuration: Unknown class in file > /etc/puppet/manifests/./nodes/vpsv2nodes.pp at line 34 > warning: Not using cache on failed configuration > > > Now, add the host to your node definition and BOOM it does not work > anymore you have to remove the downloaded fact and restart to make it > work again :)I just repeated this exact run-through on one of my machines about three times, and it works seamlessly for me every time. Can anyone else reproduce this? -- A citizen of America will cross the ocean to fight for democracy, but won''t cross the street to vote in a national election. --Bill Vaughan --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com