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
This commit is contained in:
Eduardo Olivares 2023-11-17 15:23:34 +01:00
parent 738dde0f73
commit 1d7347eab2
1 changed files with 1 additions and 0 deletions

View File

@ -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