Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9218

Refactor the crontab filetype

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • PUP 5.5.7, PUP 6.0.3
    • None
    • None
    • Platform OS
    • Platform OS Kanban
    • Needs Assessment
    • Needs Assessment

    Description

      The crontab filetype is quite old, with its class declaration outdated. Its current implementation uses `%x` instead of `Puppet::Util::Execution.execute` when executing some of the crontab commands, which is bad because any failures are swallowed. For example in read, any potential FileReadErrors are swallowed, which could lead to the behavior in PUP-9217 to occur. In remove, Puppet would have no idea whether removing the crontab entry succeeded or failed. Currently, remove is not being used anywhere so we have not yet run into any issues here; however, it would be good to fix this in case we ever do need to use it in the future.

      The work in this ticket consists of updating the crontab filetype to use `Puppet::Util::Execution.execute`. It would also be nice to make it consistent with how `suntab` and `aixtab` are implemented, if possible, since it seems like the only difference between the three commands are their error messages.

      Attachments

        Issue Links

          Activity

            People

              enis.inan Enis Inan
              enis.inan Enis Inan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support