Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-7789

Crontab gets erased after error during agent run

    Details

    • Template:
      MODULES Bug Template
    • Team:
      Platform OS
    • Sprint:
      Platform OS Kanban
    • Method Found:
      Customer Feedback
    • CS Priority:
      Normal
    • CS Frequency:
      1 - 1-5% of Customers
    • CS Severity:
      4 - Major
    • CS Business Value:
      4 - $$$$$
    • CS Impact:
      Losing crontab because of an error during the run can be hugely disruptive to customers, especially in situations where only some of their cron jobs are managed by puppet and they are now forced to recreate those in some way.
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      The crontab provider now fails any resources that are associated with a crontab whose entries Puppet failed to prefetch.
    • QA Risk Assessment:
      Needs Assessment

      Description

      OS Name/Version: PE Master/Agent Version 2016.4.2 / Master RHEL 6.9 / Agent AIX 7.1

      Customer experienced high utilization of paging space on his agent which caused the following error during a puppet run:

      Could not prefetch cron provider 'crontab' target 'root': Could not read crontab for root: Not enough space - fork(2). Treating as empty
      

      After the error occurred the customer's crontab was wiped and it left only the following:

      # HEADER: This file was autogenerated at 2017-11-09 13:20:05 -0500 by puppet. 
      # HEADER: While it can still be managed manually, it is definitely not recommended. 
      # HEADER: Note particularly that the comments starting with 'Puppet Name' should 
      # HEADER: not be deleted, as doing so could cause duplicate cron jobs. 
      <end>
      

      Another agent run after the paging problems were fixed did not resolve the crontab and it had to be restored from a backup. After the file was present, subsequent puppet runs now correct the crontab entries.

      Desired Behavior: When the error below occurs, crontab should not be wiped and should be left as is

      Could not prefetch cron provider 'crontab' target 'root': Could not read crontab for root: Not enough space - fork(2). Treating as empty
      

      Actual Behavior: Crontab gets completely wiped when the error occurs during a puppet run.

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                enis.inan Enis Inan
                Reporter:
                patrick.grant Patrick Grant
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support