Uploaded image for project: 'Multiple Architecture Enablement'
  1. Multiple Architecture Enablement
  2. MULTIARCH-3746

CI should detect when images fall out of sync

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Multi-Arch CI
    • None
    • False
    • None
    • False
    • NEW
    • x86_64, ppc64le, s390x, aarch64
    • NEW

      As a CI engineer, I would like to be notified when images in quay.io/community-e2e-images doesn't properly support multi-arch.

      This story follows up from https://issues.redhat.com/browse/OCPBUGS-16715. In this bug we discovered a cascading set of issues when the mirror job of our CI images only mirrored content for x86_64. We should be able to use something akin to the code in that issue to detect these kinds of issues early:

      image-scan.sh

      pushd origin; git fetch origin; git checkout $release; popd
      
      test_dir="image-scan-"$release
      rm -rf $test_dir; mkdir $test_dir
      
      while read line; do
         [[ $line =~ ^#.* ]] && continue
      
         image_src=$(echo $line | cut -d ' ' -f1)
         image_dst=$(echo $line | cut -d ' ' -f2)
         rm -f $test_dir/src.txt $test_dir/dst.txt
      
         podman manifest inspect $image_src > $test_dir/src.txt
         podman manifest inspect $image_dst > $test_dir/dst.txt
      
         result=0   
         diff $test_dir/src.txt $test_dir/dst.txt || result=$?
         case $result in
         1) echo "BAD IMAGE: $line" ;;
         0) echo "GOOD IMAGE: $line" ;;
         *) echo "ERROR: diff failed for $line"
         esac
      done < $file
      
      rm -r $test_dir
      

      It should be noted that we will need to maintain a skip list for image checks, since the pause image in 4.13 and above will not have a matching signature do to forced image compression in quay.io. Alternatively, for images that fail, we can fall back to checking how they would dry-run mirror via skopeo and using that to do the validation:
      `BAD IMAGE: registry.k8s.io/pause:3.9 quay.io/openshift/community-e2e-images:e2e-28-registry-k8s-io-pause-3-9-p9APyPDU5GsW02Rk`

            tvardema Trevor Vardeman
            jpoulin Jeremy Poulin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: