-
Bug
-
Resolution: Obsolete
-
Undefined
-
None
-
4.12.z, 4.11.z
-
None
-
False
-
-
Description of problem:
When running ZTP to install SNO, there is an script called /usr/local/bin/agent-fix-bz1964591 that forces the removal of an assisted service container image if it is available locally. This causes the precache tool to always pull the container image from a registry even if the image is already available locally.
Version-Release number of selected component (if applicable):
How reproducible:
Always
Steps to Reproduce:
1. Set up the precache ZTP flow by downloading the proper artifacts 2. Configure the siteconfig with the proper ZTP configuration for precaching. That includes a couple of ignitionOverrides to modify the discovery ISO. 2. 3.
Actual results:
The assisted installer agent image is always removed and then pulled from network
Expected results:
Since the agent container image is already available locally, there is no need to be pulled. The removal of this container image should be optional.
Additional info:
There is a workaround, which is basically override the script that removes the container image. This is done via an ignitionConfigOverrides. Example: https://gitlab.cee.redhat.com/sysdeseng/5g-ericsson/-/blob/cnf-integration/demos/ztp-policygen/site-configs/clus3a-t5g-lab.yaml#L31 The script ends up being modified and looks like: data:,#!/usr/bin/sh# This script is a workaround for bugzilla 1964591 where symlinks inside /var/lib/containers/ get # corrupted under some circumstances. # # In order to let agent.service start correctly we are checking here whether the requested # container image exists and in case "podman images" returns an error we try removing the faulty # image. # # In such a scenario agent.service will detect the image is not present and pull it again. In case # the image is present and can be detected correctly, no any action is required.IMAGE=$(echo $1 | sed 's/:.*//') podman image exists $1 || echo "already loaded" || echo "need to be pulled" #podman images | grep $IMAGE || podman rmi --force $1 || true
- links to
- mentioned on