Uploaded image for project: 'Ansible Automation Platform RFEs'
  1. Ansible Automation Platform RFEs
  2. AAPRFE-2306

Add a system management job called "Cleanup Job Stdout"

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 2.5
    • controller
    • False
    • Hide

      None

      Show
      None
    • False

      1. What is the nature and description of the request?

      Add a management job called "Cleanup Job Stdout"

      1. Why does the customer need this? (List the business requirements here)

      The "Cleanup Job Details" management job removes all job history and it's stdout, essentially like the job was never ran.

      At scale, keeping all job history can quickly inflate the size of the database into 10s, 100s of GBs. This can quickly cause performance issues for the database and application, depending on the resources allocated to the database.

      The customer would like to be able to retain job history through the AAP API (Which jobs ran, dates, outcomes) for longer periods of time, without sacrificing performance due to a bloated database.

      The primary culprit that drives the bloating is keeping each job's stdout in the database.

      If there were an option to cleanup only job event stdout, but keep the job information itself, this could mitigate the issue.

      1. How would you like to achieve this? (List the functional requirements here)

      Add a new management job called "Cleanup Job Stdout" that could be scheduled similar to other management jobs. 

      i.e.

      • The "Cleanup Job Stdout" job could be scheduled to run every day and set to keep the last 7 days of stdout only. 
      • The "Cleanup Job Details" job could scheduled to run everyday and set to keep the last 60 days of job history only.

      This would allow customers to keep more job history accessible via the API or UI, while mitigating the risk of the database ballooning drastically due to job stdout output.

      One possible implementation is running a query against the database such as `UPDATE main_jobevent SET stdout = '' WHERE job_created < now() - interval '7 day'`

      1. List any affected known dependencies: Doc, UI etc..
      2. Github Link if any

              Unassigned Unassigned
              hpawlows@redhat.com Homie Pawlowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: