Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-2953

PRE-CACHE tool | Assisted installer agent forces to remove a precached container image

    XMLWordPrintable

Details

    • False
    • Hide

      None

      Show
      None

    Description

      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

      Attachments

        Activity

          People

            oourfali Oved Ourfali
            alosadag@redhat.com Alberto Losada
            Ofer Bochan Ofer Bochan
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: