Browse Source

Adds heat-manage purge_deleted cron job validation

Closes-Bug: #1776721
Change-Id: I07e04ca9cdd7fcd36a203d5658a9ac67b3efdda9
(cherry picked from commit 5e7c25c124)
changes/53/762953/3
Jon Thomas 3 years ago
committed by Gael Chamoulaud (Strider)
parent
commit
1bc7423932
No known key found for this signature in database GPG Key ID: 4119D0305C651D66
2 changed files with 26 additions and 0 deletions
  1. +4
    -0
      releasenotes/notes/bug-1776721-2e0abe371abee71c.yaml
  2. +22
    -0
      validations/undercloud-heat-purge-deleted.yaml

+ 4
- 0
releasenotes/notes/bug-1776721-2e0abe371abee71c.yaml View File

@ -0,0 +1,4 @@
---
features:
- |
Adds an undercloud heat-manage purge_deleted cron job validation.

+ 22
- 0
validations/undercloud-heat-purge-deleted.yaml View File

@ -0,0 +1,22 @@
---
- hosts: undercloud
vars:
metadata:
name: Verify heat-manage purge_deleted is enabled in crontab
description: >
Without a purge_deleted crontab enabled, the
heat database can grow very large. This validation checks that
the purge_deleted crontab has been set up.
groups:
- pre-upgrade
- pre-deployment
cron_check: "heat-manage purge_deleted"
tasks:
- name: Get heat crontab
become: true
shell: 'crontab -l -u heat | grep -v "^#"'
register: cron_result
changed_when: False
- name: Check heat crontab
fail: msg="heat-manage purge_deleted does not appear to be enabled via cron. You should add '<desired interval > {{ cron_check }}' to the heat users crontab."
failed_when: "cron_check not in cron_result.stdout"

Loading…
Cancel
Save