Issue #707 has been updated by jamtur01.

Status changed from Ready for Checkin to Closed

Pushed in commit:"00182ff96f18b54aa659a1909c23ba1aba253cd8" to branch 0.24.x
----------------------------------------
Bug #707: "special" / @reboot argument doesn't work for cron
http://reductivelabs.com/redmine/issues/show/707

Author: ask
Status: Closed
Priority: Normal
Assigned to: jamtur01
Category: cron
Target version: 0.24.5
Keywords: 
Complexity: Unknown
Patch: None
Affected version: 


In past versions I could use

<pre>
   cron { ypbot_httpd:
          command => ". ~/.bash_profile; ~/ypbot/combust/bin/run_httpd",
          user => "ypprod",
          special => "reboot",
        }
</pre>
to make a cron entry like
<pre>
@reboot . ~/.bash_profile; ~/ypbot/combust/bin/run_httpd
</pre>
in 0.23.0 it broke and now puppet ends up adding the same line over and over 
again, but with * * * * * instead of "@reboot".

Running puppetd --test says 
<pre>
"err: Could not prefetch "NilClass"rovider crontab: undefined method @each' for 
nil:NilClass"
notice: //base/standard/prod-server/ypbot_app/Cron[ypbot_httpd]/ensure: created
notice: //base/standard/prod-server/ypbot_app/Cron[ypbot_svscan]/ensure: created
</pre>
and sure enough, it adds the wrong line again:
<pre>
# crontab -l -u ypprod
# HEADER This file was autogenerated at Tue Jul 03 12:13:12 -0700 2007 by 
puppet.
# HEADER While it can still be managed manually, it is definitely 
notrecommended.
# HEADER Note particularly that the comments starting with 'Puppet Name' should
# HEADER not be deleted, as doing so could cause duplicate cron jobs.
@reboot . ~/.bash_profile; ~/ypbot/bin/svscan/boot &
@reboot . ~/.bash_profile; ~/ypbot/combust/bin/run_httpd
# Puppet Name: ypbot_httpd
* * * * * . ~/.bash_profile; ~/ypbot/combust/bin/run_httpd
# Puppet Name: ypbot_svscan
* * * * * . ~/.bash_profile; ~/ypbot/bin/svscan/boot &
# Puppet Name: ypbot_httpd
* * * * * . ~/.bash_profile; ~/ypbot/combust/bin/run_httpd
# Puppet Name: ypbot_svscan
* * * * * . ~/.bash_profile; ~/ypbot/bin/svscan/boot &
</pre>
I noticed it's documented to only work on [[FreeBSD]].  It does work with 
vixie-cron too though.


----------------------------------------
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to