Puppet: System Administration Automated

Support

Ticket #648 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Crontab provider fails to remove non-managed entries when asked to

Reported by: porridge Assigned to: luke
Priority: normal Milestone: beaker
Component: library Version: 0.22.4
Severity: normal Keywords: cron crontab provider
Cc: Triage Stage: Accepted
Attached Patches: Code Complexity: Unknown

Description

OS: Solaris 10

We have an entry like this, added some time ago by hand to the root's crontab:

1 2 * * * /foo

Running puppet with the following (intended to remove that entry) doesn't do anything:

        cron { "foo":
                command => "/foo",
                user => root,
                hour => 2,
                minute => 1,
                ensure => absent
        }

Changing "ensure" to present adds a second _identical_ entry with a puppet comment above it. Changing "ensure" back to "absent" removes only that one puppet-added entry.

After some fiddling with the crontab provider I managed to fix it. I'm not sure it that's the right fix, and I don't know why it still works for already-managed entries, but it "works for me (TM)".

See the attachment for the patch.

Attachments

crontab.rb.patch (0.5 kB) - added by porridge on 05/29/07 16:47:24.
a patch that seems to work for us

Change History

05/29/07 16:47:24 changed by porridge

  • attachment crontab.rb.patch added.

a patch that seems to work for us

07/04/07 21:10:40 changed by luke

  • status changed from new to assigned.
  • stage changed from Unreviewed to Accepted.
  • milestone set to beaker.

07/06/07 01:06:54 changed by barjunk

When I look for the patch, it doesn't seem to be there.

07/12/07 06:30:56 changed by luke

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [2680], as far as I can tell.