Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-19497

"foreman-rake audits:expire" cron job exited without running

XMLWordPrintable

    • Sat_docs_2_2024, Sat_docs_3_2024
    • Important
    • None

      Description of problem:
      Getting the following messages in the cronjob log.
      ----------------
      /var/log/foreman/cron.log-20230727:[2023-07-27 01:01:01] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230728:[2023-07-28 01:00:59] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230729:[2023-07-29 01:01:01] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230730:[2023-07-30 01:01:01] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230731:[2023-07-31 01:00:59] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230801:[2023-08-01 01:01:00] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230802:[2023-08-02 01:00:58] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230803:[2023-08-03 01:01:00] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230804:[2023-08-04 01:00:59] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230805:[2023-08-05 01:01:01] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230806:[2023-08-06 01:01:00] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230807:[2023-08-07 01:01:02] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230808:[2023-08-08 01:01:01] The interval for keeping the Audits is not defined in the settings, exiting...
      /var/log/foreman/cron.log-20230809:[2023-08-09 01:01:02] The interval for keeping the Audits is not defined in the settings, exiting...
      ----------------

      This is because the audit_period setting is empty by default.
      ~~~

      1. hammer settings info --name audits_period
        Id: audits_period
        Name: audits_period
        Description: Duration in days to preserve audits for. Leave empty to disable the audits cleanup.
        Category: General
        Settings type:
        Value:
        ~~~

      Based on the documentation, default should be 90 days.
      ~~~
      16.1. Deleting Audit Records

      Audit records are created automatically in Satellite. You can use the foreman-rake audits:expire command to remove audits at any time. You can also use a cron job to schedule audit record deletions at the set interval that you want.

      By default, using the foreman-rake audits:expire command removes audit records that are older than 90 days. You can specify the number of days to keep the audit records by adding the days option and add the number of days.
      ~~~

      How reproducible:
      always

      Steps to Reproduce:
      1. Run foreman-rake audits:expire

      Actual results:
      The interval for keeping the Audits is not defined in the settings, exiting...

      Expected results:
      deleted some audit history

              rhn-support-alazik Adam Lazik
              jira-bugzilla-migration RH Bugzilla Integration
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: