Comment 1 for bug 2051005

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/c/starlingx/ansible-playbooks/+/906304
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/d81436d34eb867a16788b66393bb3783b478e581
Submitter: "Zuul (22348)"
Branch: master

commit d81436d34eb867a16788b66393bb3783b478e581
Author: Boovan Rajendran <email address hidden>
Date: Mon Jan 22 11:43:03 2024 -0500

    Exclude unwanted cached images to download during optimized restore

    During optimized restore operation download images step is
    failing since there is not enough space in the crictl image cache
    to store all of the images.

    While performing optimized B&R, we are taking a list of crictl cache
    images as a backup during backup operation. While restore download
    the images that are present in the backup cached image list and
    exclude the other images.

    we need list of k8s control plane images to satisfy the below scenarios.
     - crictl_image_cache_list is not present in backup file during restore.
     - crictl image cache was cleared before backup.

    * Push an image to registry.local before backup in a way that does not
      add it to cache.
      ```
      docker login registry.local:9001 -u admin
      docker image pull busybox
      docker tag busybox:latest registry.local:9001/docker.io/busybox:latest
      docker push registry.local:9001/docker.io/busybox:latest
      ```
    * Check the pushed image is not present in crictl image cache
      after optimized restore.
      ```
      crictl images
      ```
    * Check the pushed image is present in registry.local
      after optimized restore.
      ```
      source /etc/platform/openrc
      system registry-image-list
      ```
    Test plan:

    PASS: Perform optimized B&R on AIO-SX, verify unwanted cached images
    deleted successfully after restore.
    PASS: Perform optimized B&R on AIO-SX, verify that custom images are
    in registry.local after restore.
    PASS: Tested by creating and installing an iso as AIO-SX.
    PASS: Tested by performing multiple k8s upgrade from 1.24 to 1.27.
    PASS: Tested by performing unoptimized B&R on AIO-SX.
    PASS: Tested by performing platform upgrade.
    PASS: Tested by installing DC system.
    PASS: Tested by performing Subcloud prestage.

    Closes-Bug: 2051005

    Change-Id: Iece7229a6c0089c99be6905d7d3b9e053c45d385
    Signed-off-by: Boovan Rajendran <email address hidden>