Comment 4 for bug 1861498

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/train)

Reviewed: https://review.opendev.org/705271
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=73bb3149fba6125fa99832af42fe1f873c9f461e
Submitter: Zuul
Branch: stable/train

commit 73bb3149fba6125fa99832af42fe1f873c9f461e
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
    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.

    Co-Authored-By: Sofer Athlan-Guyot <email address hidden>

    Change-Id: I5346b32962b8cee5c64e4f07c0b68e2512085e83
    Closes-Bug: #1861498
    (cherry picked from commit 9a830255b73ec42edbdc8f7c417ebddc3ba364e4)