From b69b860563597460184609c61b0e5f358a546ac1 Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Mon, 5 Nov 2018 12:33:56 +0100 Subject: [PATCH] Fix the undercloud-heat-purge-deleted validation After containerization of the Heat services the `crontab` call that is made to determine if the 'heat-manage purge_deleted' command is present in the Heat crontab doesn't work anymore (since it's executed outside of the container where the service is running). This patch looks up the container id with the `docker ps` command and executes `crontab` inside of the container. Change-Id: Idbc24b3953c4c3f50a820ba520f90f4a06165281 Signed-off-by: Gael Chamoulaud --- validations/undercloud-heat-purge-deleted.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validations/undercloud-heat-purge-deleted.yaml b/validations/undercloud-heat-purge-deleted.yaml index 693e91b94..8c4037a5f 100644 --- a/validations/undercloud-heat-purge-deleted.yaml +++ b/validations/undercloud-heat-purge-deleted.yaml @@ -14,7 +14,7 @@ tasks: - name: Get heat crontab become: true - shell: 'crontab -l -u heat | grep -v "^#"' + shell: 'docker exec $(docker ps -q --filter "name=heat" | head -1) crontab -l -u heat |grep -v "^#"' register: cron_result changed_when: False - name: Check heat crontab