Lars Staun Knudsen
2008-Nov-01 16:02 UTC
[Puppet Users] Postfix recipe, error every other time
Hi
I''m trying to create a recipe, that installs Postfix and
''postmap'' the
sasl password file. The configuration file is created with a template.
The whole recipe works, half of the test time, the other half the
pwd-file isn''t postmap''ed.
If I test the recipe on my test client and it works perfect, I can purge
the postfix package and etc. and it will switch from working to not
working, every other time. I don''t understand why it isn''t
working and
why it follows this pattern. The recipe: http://pastebin.com/m431c37b8
The "before" highlighted is just a test. But the error/pattern happens
with or without. The puppetmaster and puppet client is all Debian
Etch/stable with testing packages.
/Lars
------- Not working ------------------------
info: //Node[basenode]/postfix_client/File[/etc/postfix/sasl/sasl.pwd]:
Scheduling refresh of Exec[postmap sasl.pwd]
notice: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]:
Triggering ''refresh'' from 1 dependencies
err: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Failed to
call refresh on Exec[postmap sasl.pwd]: postmap sasl.pwd returned 1
instead of 0 at /etc/puppet/manifests/classes/postfix_client.pp:67
info: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Scheduling
refresh of Service[postfix]
err: //Node[basenode]/postfix_client/Service[postfix]/ensure: change
from stopped to running failed: Could not find init script for
''postfix''
notice: //Node[basenode]/postfix_client/Service[postfix]: Triggering
''refresh'' from 1 dependencies
------- Working, Exec[postmap sasl.pwd] creates pwddbfile ----------------
notice: Starting Puppet client version 0.24.5
info: Retrieving facts
info: Caching catalog at /var/lib/puppet/state/localconfig.yaml
notice: Starting catalog run
notice: //Node[basenode]/postfix_client/Package[postfix]/ensure: ensure
changed ''purged'' to ''present''
notice: //Node[basenode]/postfix_client/Package[mailx]/ensure: ensure
changed ''purged'' to ''present''
notice: //Node[basenode]/postfix_client/File[/etc/postfix]/mode: mode
changed ''755'' to ''775''
notice:
//Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/checksum:
checksum changed ''{md5}d78a6e8a4f4193b70de1feda988e4ded'' to
''{md5}2c106512d4f698d8b4c36b851acb8aa1''
info: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]:
Filebucketed to with sum 2c106512d4f698d8b4c36b851acb8aa1
notice:
//Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/content:
changed file contents from {md5}2c106512d4f698d8b4c36b851acb8aa1 to
{md5}d78a6e8a4f4193b70de1feda988e4ded
notice: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/mode:
mode changed ''644'' to ''440''
notice: //Node[basenode]/postfix_client/File[/etc/postfix/sasl]/mode:
mode changed ''755'' to ''550''
notice:
//Node[basenode]/postfix_client/File[/etc/postfix/sasl/sasl.pwd]/ensure:
created
info: //Node[basenode]/postfix_client/File[/etc/postfix/sasl/sasl.pwd]:
Scheduling refresh of Exec[postmap sasl.pwd]
notice: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]:
Triggering ''refresh'' from 1 dependencies
info: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Scheduling
refresh of Service[postfix]
notice: //Node[basenode]/postfix_client/Service[postfix]: Triggering
''refresh'' from 1 dependencies
notice: //Node[basenode]/postfix_client/File[/etc/postfix/ssl]/ensure:
created
notice:
//Node[basenode]/postfix_client/File[/etc/postfix/ssl/mail.cert.pem]/ensure:
created
notice: Finished catalog run in 26.01 seconds
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Brice Figureau
2008-Nov-01 19:41 UTC
[Puppet Users] Re: Postfix recipe, error every other time
Hi, On 1/11/08 17:02, Lars Staun Knudsen wrote:> Hi > I''m trying to create a recipe, that installs Postfix and ''postmap'' the > sasl password file. The configuration file is created with a template. > The whole recipe works, half of the test time, the other half the > pwd-file isn''t postmap''ed. > If I test the recipe on my test client and it works perfect, I can purge > the postfix package and etc. and it will switch from working to not > working, every other time. I don''t understand why it isn''t working and > why it follows this pattern. The recipe: http://pastebin.com/m431c37b8 > The "before" highlighted is just a test. But the error/pattern happens > with or without. The puppetmaster and puppet client is all Debian > Etch/stable with testing packages.Your Exec["postmap sasl.pwd"] uses refreshonly (good) but also creates (not so good). The "creates" triggers only if the file doesn''t exists. If the file created file already exists, even if refreshonly is true, it won''t execute the command again. Remove the "creates" should solve your issue. -- Brice Figureau Days of Wonder http://www.daysofwonder.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
> Your Exec["postmap sasl.pwd"] uses refreshonly (good) but also creates > (not so good). The "creates" triggers only if the file doesn''t exists. > If the file created file already exists, even if refreshonly is true, it > won''t execute the command again. > Remove the "creates" should solve your issue.Thanks for the reply. I''ve removed the "creates" trigger, i can see you point. But I still get the error, also with or without the before trigger in the sasl pwd-file. Should the "before" trigger stay? The "Exec of postmap sasl.pwd" triggers on the pwd-file, so is it necessary to set that the file should be transfered before the execution. /Lars I can see that my copy paste of the error is a bit stripped. notice: Starting Puppet client version 0.24.5 info: Retrieving facts info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run notice: //Node[basenode]/postfix_client/File[/etc/postfix]/ensure: created notice: //Node[basenode]/postfix_client/File[/etc/postfix/sasl]/ ensure: created notice: //Node[basenode]/postfix_client/File[/etc/postfix/sasl/ sasl.pwd]/ensure: created info: //Node[basenode]/postfix_client/File[/etc/postfix/sasl/ sasl.pwd]: Scheduling refresh of Exec[postmap sasl.pwd] notice: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Triggering ''refresh'' from 1 dependencies err: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Failed to call refresh on Exec[postmap sasl.pwd]: postmap sasl.pwd returned 1 instead of 0 at /etc/puppet/manifests/classes/postfix_client.pp:74 info: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Scheduling refresh of Service[postfix] err: //Node[basenode]/postfix_client/Service[postfix]/ensure: change from stopped to running failed: Could not find init script for ''postfix'' notice: //Node[basenode]/postfix_client/Service[postfix]: Triggering ''refresh'' from 1 dependencies warning: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/ checksum: File /etc/postfix/main.cf does not exist -- cannot checksum notice: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/ checksum: defined ''checksum'' as ''{md5}d78a6e8a4f4193b70de1feda988e4ded'' notice: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/ content: created file with contents {md5}d78a6e8a4f4193b70de1feda988e4ded notice: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/ owner: defined ''owner'' as ''root'' notice: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/ group: defined ''group'' as ''root'' notice: //Node[basenode]/postfix_client/File[/etc/postfix/main.cf]/ mode: defined ''mode'' as ''440'' notice: //Node[basenode]/postfix_client/File[/etc/postfix/ssl]/ensure: created notice: //Node[basenode]/postfix_client/File[/etc/postfix/ssl/ mail.cert.pem]/ensure: created notice: //Node[basenode]/postfix_client/Package[postfix]/ensure: ensure changed ''purged'' to ''present'' notice: //Node[basenode]/postfix_client/Package[mailx]/ensure: ensure changed ''purged'' to ''present'' notice: Finished catalog run in 20.52 seconds --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Brice Figureau
2008-Nov-02 19:57 UTC
[Puppet Users] Re: Postfix recipe, error every other time
On 2/11/08 12:47, Lars wrote:>> Your Exec["postmap sasl.pwd"] uses refreshonly (good) but also creates >> (not so good). The "creates" triggers only if the file doesn''t exists. >> If the file created file already exists, even if refreshonly is true, it >> won''t execute the command again. >> Remove the "creates" should solve your issue. > > Thanks for the reply. I''ve removed the "creates" trigger, i can see > you point. But I still get the error, also with or without the before > trigger in the sasl pwd-file. Should the "before" trigger stay? The > "Exec of postmap sasl.pwd" triggers on the pwd-file, so is it > necessary to set that the file should be transfered before the > execution.The before is of no use I think. The sasl.pwd file is created as it should, what is wrong is that your command returns an exit code of 1. notice: //Node[basenode]/postfix_client/File[/etc/postfix/sasl/ sasl.pwd]/ensure: created info: //Node[basenode]/postfix_client/File[/etc/postfix/sasl/ sasl.pwd]: Scheduling refresh of Exec[postmap sasl.pwd] Then the exec is launched: notice: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Triggering ''refresh'' from 1 dependencies Which failed: err: //Node[basenode]/postfix_client/Exec[postmap sasl.pwd]: Failed to call refresh on Exec[postmap sasl.pwd]: postmap sasl.pwd returned 1 instead of 0 at /etc/puppet/manifests/classes/postfix_client.pp:74 You should run the command youself by hand to see why it fails. You should try to run your puppetd with --debug also to see more information. Also have a look to your syslog/maillog/whateverlog because I remind that postmap logs something in case of error. Hope that helps, -- Brice Figureau Days of Wonder http://www.daysofwonder.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---