Issue #1672 has been updated by martin.

Some further digging revealed that the cause is when it calls "crontab -l" it 
fails, and since the below code assumes an error mean that the crontab is 
empty, the original contents get overwritten.

<pre>
    # SunOS has completely different cron commands; this class implements
    # its versions.
    newfiletype(:suntab) do
        # Read a specific @path's cron tab.
        def read
            begin
                output = Puppet::Util.execute(%w{crontab -l}, :uid => @path)
                return "" if output.include?("can't open your crontab")
                return output
            rescue
                # If there's a failure, treat it like an empty file.
                return ""
            end
        end
</pre>
----------------------------------------
Bug #1672: crontab update craps out in zones on Solaris 10
http://projects.reductivelabs.com/issues/show/1672

Author: martin
Status: Accepted
Priority: High
Assigned to: community
Category: cron
Target version: unplanned
Complexity: Unknown
Affected version: 0.24.5
Keywords: 


I'm using the crontab type to add an entry, and the update craps out with the 
following error:
<pre>
debug: Executing 'crontab /tmp/puppet20081021-25388-z3vqav-0'
err: Could not apply complete catalog: Could not write crontab for root: No 
child processes
</pre>

and the major problem is that it truncates the crontab file. If it fails it 
should revert it back to the original contents instead of abandoning it in an 
unknown state or at least give you a pointer to where the original crontab 
contents can be found.


----------------------------------------
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