From 1d7347eab2a738f266273907d67e962b46e3cb01 Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Fri, 17 Nov 2023 15:23:34 +0100 Subject: [PATCH] Exclude container-ps-before_undercloud file when comparing OC containers The collect_logs.yaml playbook is executed on different steps of the update process, in order to obtain a list of containers running on the undercloud and overcloud nodes during each step. At the final step (before-reboot), the newest list of containers is compared with the oldest one and an error is raised unless all container versions have been updated. The oldest list corresponds with the file whose name starts with "container-ps-before_undercloud". The problem is that the workload script is run after the undercloud update and there are some containers (sidecar containers) that are only created on the overcloud nodes when some workload is created. If the sidecar container version was not updated on some overcloud node, this issue would not be currently detected. With this patch, the running container comparison on the overcloud nodes excludes the container-ps-before_undercloud file. Change-Id: I779b03ecf3513e6d528df25160ca6a14fe32761f --- templates/collect_logs.yaml.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/collect_logs.yaml.j2 b/templates/collect_logs.yaml.j2 index 9879fe0e..07bc19eb 100644 --- a/templates/collect_logs.yaml.j2 +++ b/templates/collect_logs.yaml.j2 @@ -55,6 +55,7 @@ find: paths: "/var/log/extra/" patterns: 'container-ps-before_*.txt' + excludes: "{% raw %}{{ 'undercloud' in inventory_hostname | ternary(null, 'container-ps-before_undercloud*') }}{% endraw %}" register: found_files - name: get the oldest file related to container states