Remove all the "container_cli rmi -f" from HA containers
Back in the days we had added the rmi -f container calls in order
to try and clean up any old unused container images whenever we updated
any HA container. Nowadays this already happens via the
tripleo_ansible/tripleo_podman/purge role which prunes any unused
container image.
There is no point in keeping this code around since we already purge
images as a post upgrade/update task. We want to remove this code also
because it fails horribly when we update the HA containers with an image
that is based off the previously deployed image. In fact that fails
with:
TASK [Remove previous galera images] *******************************************
Friday 31 January 2020 10:34:40 +0000 (0:00:02.684) 0:02:56.021 ********
fatal: [database-0]: FAILED! => {"changed": true, "cmd": "podman rmi -f 209e952aa6cb3c212e57e5f81693eb4776c0c4b6cf96fb4faabdaa7403b2a94d", "delta": "0:00:00.110460", "end": "2020-01-31 10:34:40.772522", "msg": "non-zero return code", "rc": 2, "start": "2020-01-31 10:34:40.662062", "stderr": "Error: unable to delete \"209e952aa6cb3c212e57e5f81693eb4776c0c4b6cf96fb4faabdaa7403b2a94d\" (cannot be forced) - image has dependent child images", "stderr_lines": ["Error: unable to delete \"209e952aa6cb3c212e57e5f81693eb4776c0c4b6cf96fb4faabdaa7403b2a94d\" (cannot be forced) - image has dependent child images"], "stdout": "", "stdout_lines": []}
This is particularly important because any hotfix container
generated with tripleo-modify-image role will be affected by this issue.
We tested this by doing the following:
1) Deploying an overcloud
2) Patching all HA containers with tripleo-modify-image
3) Running an update
With this change the update did not fail any longer and the correct
images were being used by pacemaker after the update process.
Reviewed: https:/ /review. opendev. org/705271 /git.openstack. org/cgit/ openstack/ tripleo- heat-templates/ commit/ ?id=73bb3149fba 6125fa99832af42 fe1f873c9f461e
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 73bb3149fba6125 fa99832af42fe1f 873c9f461e
Author: Michele Baldessari <email address hidden>
Date: Fri Jan 31 19:04:16 2020 +0100
Remove all the "container_cli rmi -f" from HA containers
Back in the days we had added the rmi -f container calls in order ansible/ tripleo_ podman/ purge role which prunes any unused
to try and clean up any old unused container images whenever we updated
any HA container. Nowadays this already happens via the
tripleo_
container image.
There is no point in keeping this code around since we already purge ******* ******* ******* ******* ******* * 12e57e5f81693eb 4776c0c4b6cf96f b4faabdaa7403b2 a94d", "delta": "0:00:00.110460", "end": "2020-01-31 10:34:40.772522", "msg": "non-zero return code", "rc": 2, "start": "2020-01-31 10:34:40.662062", "stderr": "Error: unable to delete \"209e952aa6cb3 c212e57e5f81693 eb4776c0c4b6cf9 6fb4faabdaa7403 b2a94d\ " (cannot be forced) - image has dependent child images", "stderr_lines": ["Error: unable to delete \"209e952aa6cb3 c212e57e5f81693 eb4776c0c4b6cf9 6fb4faabdaa7403 b2a94d\ " (cannot be forced) - image has dependent child images"], "stdout": "", "stdout_lines": []}
images as a post upgrade/update task. We want to remove this code also
because it fails horribly when we update the HA containers with an image
that is based off the previously deployed image. In fact that fails
with:
TASK [Remove previous galera images] *******
Friday 31 January 2020 10:34:40 +0000 (0:00:02.684) 0:02:56.021 ********
fatal: [database-0]: FAILED! => {"changed": true, "cmd": "podman rmi -f 209e952aa6cb3c2
This is particularly important because any hotfix container modify- image role will be affected by this issue.
generated with tripleo-
We tested this by doing the following: modify- image
1) Deploying an overcloud
2) Patching all HA containers with tripleo-
3) Running an update
With this change the update did not fail any longer and the correct
images were being used by pacemaker after the update process.
Co-Authored-By: Sofer Athlan-Guyot <email address hidden>
Change-Id: I5346b32962b8ce e5c64e4f07c0b68 e2512085e83 edbdc8f7c417ebd dc3ba364e4)
Closes-Bug: #1861498
(cherry picked from commit 9a830255b73ec42