Ansible Automation Platform job fails with the error [ansiblehub] unsupported schema version 2

Solution Verified - Updated -

Environment

  • Red Hat® Ansible Automation Platform 2.2
  • Ansible Automation Controller 4.2
  • Private Automation Hub 4.5

Issue

  • Ansible Automation Platform Job run fails with the docker schema error when using Private Automation Hub image

  • The image is uploaded to Private Automation Hub, configured via remote registry (For example, quay.io)

    DEBU[0001] Error pulling candidate xxxx/vmware:latest: initializing image from source docker://xxxxx/vmware:latest: unsupported schema version 2
    

Resolution

Diagnostic Steps

  • The debug log of podman pull from the Automation Controller server returns the following error:

    # podman pull image:version --tls-verify=false --log-level=debug
    
    time="2022-11-10T13:19:51+01:00" level=info msg="podman filtering at log level debug"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Called pull.PersistentPreRunE(podman pull automationhub:image:latest --tls-verify=false --log-level=debug)"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Merged system config \"/usr/share/containers/containers.conf\""
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using conmon: \"/usr/bin/conmon\""
    time="2022-11-10T13:19:51+01:00" level=debug msg="Initializing boltdb state at /home/testuser/.local/share/containers/storage/libpod/bolt_state.db"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using graph driver overlay"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using graph root /home/testuser/.local/share/containers/storage"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using run root /run/user/1000/containers"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using static dir /home/testuser/.local/share/containers/storage/libpod"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using tmp dir /run/user/1000/libpod/tmp"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using volume path /home/testuser/.local/share/containers/storage/volumes"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Loading registries configuration \"/etc/containers/registries.conf\""
    time="2022-11-10T13:19:51+01:00" level=debug msg="Loading registries configuration \"/etc/containers/registries.conf.d/000-shortnames.conf\""
    time="2022-11-10T13:19:51+01:00" level=debug msg="Normalized platform linux/amd64 to {amd64 linux  [] }"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Attempting to pull candidate automationhub:image:latest for automationhub:image:latest"
    time="2022-11-10T13:19:51+01:00" level=debug msg="parsed reference into \"[overlay@/home/testuser/.local/share/containers/storage+/run/user/1000/containers]automationhub:image:latest\""
    Trying to pull automationhub:image:latest...
    time="2022-11-10T13:19:51+01:00" level=debug msg="Copying source image //automationhub:image:latest to destination image [overlay@/home/testuser/.local/share/containers/storage+/run/user/1000/containers]automationhub:image:latest"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Using registries.d directory /etc/containers/registries.d"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Trying to access \"automationhub:image:latest\""
    time="2022-11-10T13:19:51+01:00" level=debug msg="Found credentials for automationhub:image in credential helper containers-auth.json in file /run/user/1000/containers/auth.json"
    time="2022-11-10T13:19:51+01:00" level=debug msg=" No signature storage configuration found for automationhub:image:latest, using built-in default file:///home/testuser/.local/share/containers/sigstore"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Looking for TLS certificates and private keys in /etc/docker/certs.d/automationhub"
    time="2022-11-10T13:19:51+01:00" level=debug msg="GET https://automationhub/v2/"
    time="2022-11-10T13:19:51+01:00" level=debug msg="Ping https://automationhub/v2/ status 401"
    time="2022-11-10T13:19:51+01:00" level=debug msg="GET https://automationhub/token?account=requirements-robot&scope=repository%3Aee_itxbase_supported%3Apull&service=automationhub"
    time="2022-11-10T13:19:51+01:00" level=debug msg="GET https://automationhub/v2/ee_itxbase_supported/manifests/latest"
    time="2022-11-10T13:19:52+01:00" level=debug msg="Content-Type from manifest GET is \"application/vnd.docker.distribution.manifest.v1+prettyjws\""
    time="2022-11-10T13:19:52+01:00" level=debug msg="Using blob info cache at /home/testuser/.local/share/containers/cache/blob-info-cache-v1.boltdb"
    time="2022-11-10T13:19:52+01:00" level=debug msg="IsRunningImageAllowed for image docker:automationhub:image:latest"
    time="2022-11-10T13:19:52+01:00" level=debug msg=" Using default policy section"
    time="2022-11-10T13:19:52+01:00" level=debug msg=" Requirement 0: allowed"
    time="2022-11-10T13:19:52+01:00" level=debug msg="Overall: allowed"
    time="2022-11-10T13:19:52+01:00" level=debug msg="Error pulling candidate automationhub:image:latest: initializing image from source docker://automationhub:image:latest: unsupported schema version 2"
    Error: initializing image from source docker://automationhub:image:latest: unsupported schema version 2
    
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments