Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import containerd images with all platforms #2198

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

erikwilson
Copy link
Contributor

@erikwilson erikwilson commented Sep 3, 2020

Proposed Changes

Set WithAllPlatforms option on containerd image import.

Types of Changes

  • airgap image load

Verification

  1. Perform airgap install on arm64
  2. Run k3s ctr images check; verify all image layers present
  3. Run k3s kubectl get pods -A; verify all pods running or completed

Linked Issues

Related to #1285

Further Comments

Some of the images contain configs that indicate they are amd64 despite actually being arm64. This causes the containerd import process to skip their layers since it filters out mismatched architectures by default. Setting the option to import layers for all platforms allows us to use these images anyways, until the upstreams are fixed.

@brandond
Copy link
Member

brandond commented Sep 15, 2020

FYI I have confirmed that importing with all platforms fixes arm64 with the images in the current airgap tarball. You can even fix this manually with ctr:

  1. Started k3s on arm64 airgap'd with current 1.19.1 RC tarball
  2. Pods fail to start due to missing layers, k3s ctr images check shows missing layers:
    docker.io/rancher/metrics-server:v0.3.6                                 application/vnd.docker.distribution.manifest.v2+json sha256:a45721c91d23360a09f10c804228266f134e04c5b0c90d726e9975318f9bc89c incomplete (0/3) 0.0 B/37.7 MiB      false
    docker.io/rancher/pause:3.1                                             application/vnd.docker.distribution.manifest.v2+json sha256:ce553ebde39a4c7062e0fa059fc28b90adcca33967264e3453407acf728b37fb incomplete (0/2) 0.0 B/516.1 KiB     false
    
  3. Run k3s ctr images import --all-platforms /var/lib/rancher/k3s/agent/images/k3s-airgap-images-arm64.tar
  4. k3s ctr images check shows layers present:
    docker.io/rancher/metrics-server:v0.3.6                                 application/vnd.docker.distribution.manifest.v2+json sha256:a45721c91d23360a09f10c804228266f134e04c5b0c90d726e9975318f9bc89c complete (3/3) 37.7 MiB/37.7 MiB   true
    docker.io/rancher/pause:3.1                                             application/vnd.docker.distribution.manifest.v2+json sha256:ce553ebde39a4c7062e0fa059fc28b90adcca33967264e3453407acf728b37fb complete (2/2) 516.1 KiB/516.1 KiB true
    
  5. k3s kubectl get pods -A shows:
    NAMESPACE     NAME                                     READY   STATUS      RESTARTS   AGE
    kube-system   coredns-66c464876b-zvkvp                 1/1     Running     0          26m
    kube-system   metrics-server-7b4f8b595-cl45m           1/1     Running     0          26m
    kube-system   local-path-provisioner-567b7c559-d6qd2   1/1     Running     0          26m
    kube-system   helm-install-traefik-ttgg9               0/1     Completed   0          26m
    kube-system   svclb-traefik-pj4sm                      2/2     Running     0          5m39s
    kube-system   traefik-5dd496474-s59tt                  1/1     Running     0          5m39s
    

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond marked this pull request as ready for review September 15, 2020 00:29
@brandond brandond requested a review from a team as a code owner September 15, 2020 00:29
@brandond brandond changed the title WIP- Import containerd images with all platforms Import containerd images with all platforms Sep 15, 2020
@brandond
Copy link
Member

brandond commented Sep 15, 2020

Confirmed with PR build on arm64:

root@pi02:~# k3s ctr images check
REF                                                                     TYPE                                                 DIGEST                                                                  STATUS         SIZE                UNPACKED
docker.io/rancher/coredns-coredns:1.6.9                                 application/vnd.docker.distribution.manifest.v2+json sha256:b84863f71ae0431064b7703a9311cfd313fa9e6bda287ba29f3db7d827fc5734 complete (3/3) 39.1 MiB/39.1 MiB   false
docker.io/rancher/klipper-helm:v0.3.0                                   application/vnd.docker.distribution.manifest.v2+json sha256:dd66cc46eb12f75ce62efbd51cfe70b57c042cf0c0d49ccb23777cd80e0e5a6f complete (5/5) 133.1 MiB/133.1 MiB false
docker.io/rancher/klipper-lb:v0.1.2                                     application/vnd.docker.distribution.manifest.v2+json sha256:286444e795df0c3feb60f1bfd4b356168f6af62f005b53d255fda5acfe1b8807 complete (4/4) 5.9 MiB/5.9 MiB     false
docker.io/rancher/library-traefik:1.7.19                                application/vnd.docker.distribution.manifest.v2+json sha256:e32274d48325baa644e074e7917f47024b07c11d407fe0239658e274b9f2ad1f complete (4/4) 79.8 MiB/79.8 MiB   false
docker.io/rancher/local-path-provisioner:v0.0.14                        application/vnd.docker.distribution.manifest.v2+json sha256:9d39d947c253a93cfbaa9b6106148744bd2967a4114b13dd96aab3b3fd6826e8 complete (3/3) 38.3 MiB/38.3 MiB   false
docker.io/rancher/metrics-server:v0.3.6                                 application/vnd.docker.distribution.manifest.v2+json sha256:a45721c91d23360a09f10c804228266f134e04c5b0c90d726e9975318f9bc89c complete (3/3) 37.7 MiB/37.7 MiB   false
docker.io/rancher/pause:3.1                                             application/vnd.docker.distribution.manifest.v2+json sha256:ce553ebde39a4c7062e0fa059fc28b90adcca33967264e3453407acf728b37fb complete (2/2) 516.1 KiB/516.1 KiB false
sha256:1cdb7e2bd5e25744fb1c898242b764f88bd9f017726d6f17a4060c22bdc4a23e application/vnd.docker.distribution.manifest.v2+json sha256:e32274d48325baa644e074e7917f47024b07c11d407fe0239658e274b9f2ad1f complete (4/4) 79.8 MiB/79.8 MiB   false
sha256:2b703ea309660ea944a48f41bb7a55716d84427cf5e04b8078bcdc44fa4ab2eb application/vnd.docker.distribution.manifest.v2+json sha256:9d39d947c253a93cfbaa9b6106148744bd2967a4114b13dd96aab3b3fd6826e8 complete (3/3) 38.3 MiB/38.3 MiB   false
sha256:4001cb2c385cea209c40f7a0e33fa24cb99de1e73fc97bb41ff4aed70f072cdd application/vnd.docker.distribution.manifest.v2+json sha256:dd66cc46eb12f75ce62efbd51cfe70b57c042cf0c0d49ccb23777cd80e0e5a6f complete (5/5) 133.1 MiB/133.1 MiB false
sha256:6cf7c80fe4444767f63116e6855bf8c90bddde8ef63d3a2dc9b86c74989a4eb5 application/vnd.docker.distribution.manifest.v2+json sha256:ce553ebde39a4c7062e0fa059fc28b90adcca33967264e3453407acf728b37fb complete (2/2) 516.1 KiB/516.1 KiB false
sha256:9be4f056f04b712392ba99b1ed941caf2bd6e8bd9da5a007f7270a1c38bf127d application/vnd.docker.distribution.manifest.v2+json sha256:286444e795df0c3feb60f1bfd4b356168f6af62f005b53d255fda5acfe1b8807 complete (4/4) 5.9 MiB/5.9 MiB     false
sha256:af51a588dff593ea54459aa62e0ba8cd7ce9f43ff3d93a5da7d541e57c46702e application/vnd.docker.distribution.manifest.v2+json sha256:b84863f71ae0431064b7703a9311cfd313fa9e6bda287ba29f3db7d827fc5734 complete (3/3) 39.1 MiB/39.1 MiB   false
sha256:f9499facb1e8c3c907d82f50441b8da45115c4314a9c175c8b3797e489c1cf1e application/vnd.docker.distribution.manifest.v2+json sha256:a45721c91d23360a09f10c804228266f134e04c5b0c90d726e9975318f9bc89c complete (3/3) 37.7 MiB/37.7 MiB   false
root@pi02:~# k3s kubectl get pods -A -o wide
NAMESPACE     NAME                                     READY   STATUS      RESTARTS   AGE    IP            NODE             NOMINATED NODE   READINESS GATES
kube-system   metrics-server-7b4f8b595-mpmvl           1/1     Running     0          106s   10.42.0.108   pi02.lan.khaus   <none>           <none>
kube-system   local-path-provisioner-567b7c559-6lppt   1/1     Running     0          106s   10.42.0.106   pi02.lan.khaus   <none>           <none>
kube-system   coredns-66c464876b-jpsdh                 1/1     Running     0          106s   10.42.0.107   pi02.lan.khaus   <none>           <none>
kube-system   helm-install-traefik-p5pnt               0/1     Completed   0          106s   10.42.0.109   pi02.lan.khaus   <none>           <none>
kube-system   svclb-traefik-h74vh                      2/2     Running     0          25s    10.42.0.111   pi02.lan.khaus   <none>           <none>
kube-system   traefik-5dd496474-7dbw8                  1/1     Running     0          25s    10.42.0.110   pi02.lan.khaus   <none>           <none>
root@pi02:~# k3s kubectl get nodes -o wide
NAME             STATUS   ROLES    AGE   VERSION                INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                                     KERNEL-VERSION     CONTAINER-RUNTIME
pi02.lan.khaus   Ready    master   3m    v1.19.1+k3s-d7e3bef9   10.0.1.24     <none>        Ubuntu Groovy Gorilla (development branch)   5.4.0-1018-raspi   containerd://1.4.0-k3s1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants