harvester / upgrade-helpers

4 stars 9 forks source link

Image purge doesn't support versions 1.0.x or 1.3.x #12

Open simonflood opened 1 month ago

simonflood commented 1 month ago

The image purge script harv-purge-images.sh can't handle versions v1.0.x or v1.3.x as the required images-lists.tar.gz files are not available for download at https://releases.rancher.com/harvester//image-lists.tar.gz.

Having originally installed my cluster as v1.0.0 then upgraded since and now at v1.3.1 I was hoping to be able to use this script to identify obsolete images then free up disk space.

Note the script would work if the missing images-lists-.tar.gz files were available.

simonflood commented 1 month ago

Checking ISO images I think it's possible to create the missing files and/or provide the required input to the script although it seems along the way changes were made to how multiple images txt files were distributed, firstly in bundle/harvester/images/ then from 1.0.3 in bundle/harvester/images-lists/ and from 1.x.x also with a consolidated image_list_all.txt in bundle/harvester/images-lists-archive.

Indirectly this might help solve Martin's #9 problem.

simonflood commented 1 month ago

I've also noticed that the output from crictl imgon my nodes (started 1.0.0 upgraded through to 1.3.1) shows a lot of images with the Image and/or Tag as so I'm guessing at least some of these are obsolete and could be deleted. Don't think the image purge script would help confirm this but some are taking up a lot of space.

IMAGE                                                                       TAG                                        IMAGE ID            SIZE
docker.io/banzaicloud/eventrouter                                           v0.1.0                                     00f781432854f       67.7MB
<none>                                                                      <none>                                     03e115718d258       56.2MB
<none>                                                                      <none>                                     0558017dd6268       98.6MB
<none>                                                                      <none>                                     0f0a0f7990768       52.9MB
<none>                                                                      <none>                                     142ad55c97b41       251MB
<none>                                                                      <none>                                     16f0d1cc414ba       209MB
<none>                                                                      <none>                                     1df30f0e25552       55.4MB
<none>                                                                      <none>                                     27326d376ad62       208MB
docker.io/rancher/gitjob                                                    <none>                                     4ea55b57283d4       90.5MB
docker.io/rancher/mirrored-ingress-nginx-kube-webhook-certgen               <none>                                     69547dffc18fc       19.4MB
docker.io/longhornio/backing-image-manager                                  v1.6.2                                     9b8cf5184bda1       377MB
docker.io/longhornio/backing-image-manager                                  v3_20221003                                1a7095f7e9bc9       343MB
docker.io/longhornio/csi-attacher                                           v4.5.1                                     ebcde6f69ddda       64.7MB
docker.io/longhornio/csi-node-driver-registrar                              v2.9.2                                     438c692b0cb6d       23.2MB
docker.io/longhornio/csi-provisioner                                        v3.6.2                                     ec9b939801797       68.1MB
docker.io/longhornio/csi-provisioner                                        v3.6.4                                     cc753cf7b8127       67.6MB
docker.io/longhornio/csi-resizer                                            v1.10.1                                    644d77abe33db       66MB
docker.io/longhornio/csi-resizer                                            v1.2.0                                     0aa9629e1508b       55.2MB
docker.io/longhornio/csi-resizer                                            v1.9.2                                     d11bd1f0b3e57       64.3MB
docker.io/longhornio/csi-snapshotter                                        v3.0.3                                     000846ee53356       49.1MB
docker.io/longhornio/csi-snapshotter                                        v6.3.2                                     118137d698bbd       64.1MB
docker.io/longhornio/csi-snapshotter                                        v6.3.4                                     eccecdceb86c0       64.4MB
docker.io/longhornio/livenessprobe                                          v2.12.0                                    38ae1b6759b01       28.7MB
docker.io/longhornio/longhorn-engine                                        v1.3.2                                     8681890ac02c0       801MB
docker.io/longhornio/longhorn-engine                                        v1.4.3                                     97b06aa073605       749MB
docker.io/longhornio/longhorn-engine                                        v1.5.5                                     457308d22a10f       332MB
docker.io/longhornio/longhorn-engine                                        v1.6.2                                     7fb50a1bbe317       363MB
docker.io/longhornio/longhorn-instance-manager                              v1.4.3                                     58e18670be17a       751MB
docker.io/longhornio/longhorn-instance-manager                              v1.6.2                                     23292e266e0eb       748MB
docker.io/longhornio/longhorn-manager                                       v1.5.5                                     036b3016466f4       322MB
docker.io/longhornio/longhorn-manager                                       v1.6.2                                     6b0b2d18564be       317MB
docker.io/longhornio/longhorn-ui                                            v1.3.2                                     986423ced5a53       206MB
docker.io/longhornio/longhorn-ui                                            v1.5.5                                     98fbcd3e7b249       212MB
docker.io/longhornio/longhorn-ui                                            v1.6.2                                     b1c8e3638fc43       217MB
docker.io/rancher/fleet-agent                                               v0.7.1                                     5ffd7cb878a17       114MB
docker.io/rancher/fleet-agent                                               v0.9.0                                     cf9285647d681       340MB
docker.io/rancher/fleet-agent                                               v0.9.2                                     764c59641b7c2       296MB
docker.io/rancher/fleet-agent                                               v0.9.5                                     a621bb7a95528       108MB
docker.io/rancher/fleet                                                     v0.9.2                                     3f64f9066e0b1       235MB
docker.io/rancher/gitjob                                                    v0.1.32                                    21b005c169ced       258MB
docker.io/rancher/gitjob                                                    v0.1.96                                    cba4deea38be1       205MB
docker.io/rancher/gitjob                                                    v0.9.4                                     b19fa0f3e910d       225MB
docker.io/rancher/hardened-calico                                           v3.27.2-build20240308                      523e281ead3e4       555MB
docker.io/rancher/hardened-calico                                           v3.27.3-build20240423                      3564b4ac1d3dc       558MB
docker.io/rancher/hardened-cluster-autoscaler                               v1.8.10-build20240124                      cd00dc5289588       38.3MB
docker.io/rancher/hardened-cluster-autoscaler                               v1.8.5-build20221011                       abb6110f4d4cc       148MB
docker.io/rancher/hardened-cni-plugins                                      v1.4.0-build20240122                       1218a19dc8780       93.7MB
docker.io/rancher/hardened-coredns                                          v1.11.1-build20240305                      00df8b41cfd2e       72.6MB
docker.io/rancher/hardened-dns-node-cache                                   1.22.28-build20240125                      2563e24ce2d2c       64MB
docker.io/rancher/hardened-etcd                                             v3.5.9-k3s1-build20230802                  c6b7a4f2f79b2       168MB
docker.io/rancher/hardened-etcd                                             v3.5.9-k3s1-build20240418                  7893f7425a52a       44.1MB
docker.io/rancher/hardened-flannel                                          v0.24.3-build20240307                      8528b1462aac1       223MB
docker.io/rancher/hardened-flannel                                          v0.25.1-build20240423                      398c3d1a135f0       227MB
docker.io/rancher/hardened-k8s-metrics-server                               v0.6.3-build20231009                       9051c01da7c50       173MB
docker.io/rancher/hardened-k8s-metrics-server                               v0.7.1-build20240401                       6d80f01a1966b       58.3MB
docker.io/rancher/hardened-kubernetes                                       v1.26.15-rke2r1-build20240314              4a2dd7d23859b       742MB
docker.io/rancher/hardened-kubernetes                                       v1.27.13-rke2r1-build20240416              0b811a311e23c       576MB
docker.io/rancher/hardened-multus-cni                                       v4.0.2-build20240208                       d41d049a62ad0       51.9MB
docker.io/rancher/harvester-cluster-repo                                    v1.2.2                                     19c991f66b8f9       194MB
docker.io/rancher/harvester-cluster-repo                                    v1.3.1                                     2c0def70a38bb       194MB
docker.io/rancher/harvester-eventrouter                                     v0.2.0                                     a86d934733e78       91MB
docker.io/rancher/harvester-load-balancer-webhook                           v0.2.6                                     0972dca5ab65c       106MB
docker.io/rancher/harvester-load-balancer-webhook                           v0.3.0                                     d11ba2973ed49       106MB
docker.io/rancher/harvester-load-balancer                                   v0.2.6                                     faaac130b408c       104MB
docker.io/rancher/harvester-load-balancer                                   v0.3.0                                     945e0ec017079       104MB
docker.io/rancher/harvester-network-controller                              v0.4.0                                     b4aa17f3b8e20       213MB
docker.io/rancher/harvester-network-helper                                  v0.3.7                                     b916c614b68c7       95MB
docker.io/rancher/harvester-network-helper                                  v0.4.0                                     5320659f27001       115MB
docker.io/rancher/harvester-network-webhook                                 v0.3.2                                     e7e9de4985a63       98.5MB
docker.io/rancher/harvester-network-webhook                                 v0.3.7                                     f8baff486d425       99.5MB
docker.io/rancher/harvester-network-webhook                                 v0.4.0                                     d7f2476e98bb9       121MB
docker.io/rancher/harvester-node-disk-manager                               v0.6.3                                     e941b03ff4e16       201MB
docker.io/rancher/harvester-node-manager-webhook                            v0.2.1                                     3dc3bc0ec02b0       170MB
docker.io/rancher/harvester-node-manager                                    v0.1.10                                    80d658af9d33d       166MB
docker.io/rancher/harvester-node-manager                                    v0.2.1                                     8e1a6a5cff4e3       166MB
docker.io/rancher/harvester-pcidevices                                      v0.2.7                                     e67d4235c54cf       244MB
docker.io/rancher/harvester-pcidevices                                      v0.3.2                                     13527cccde2a1       253MB
docker.io/rancher/harvester-seeder                                          v0.3.0                                     e321b05a5cedb       215MB
docker.io/rancher/harvester-upgrade                                         v1.2.0                                     c55b19a5e0828       403MB
docker.io/rancher/harvester-upgrade                                         v1.2.1                                     899db0c8b2eed       403MB
docker.io/rancher/harvester-upgrade                                         v1.2.2                                     4bac90a12cf67       150MB
docker.io/rancher/harvester-upgrade                                         v1.3.1                                     326671a11ed13       446MB
docker.io/rancher/harvester-vm-import-controller                            v0.1.8                                     1debcee98c9c1       260MB
docker.io/rancher/harvester-vm-import-controller                            v0.3.0                                     fb1dafdf482b6       266MB
docker.io/rancher/harvester-webhook                                         v1.2.0                                     5b0e07f701f84       229MB
docker.io/rancher/harvester-webhook                                         v1.2.2                                     f686ffbdb4a3c       239MB
docker.io/rancher/harvester-webhook                                         v1.3.1                                     bedd7044b5b4b       241MB
docker.io/rancher/harvester                                                 v1.2.0                                     1edc20b1ce5d4       319MB
docker.io/rancher/harvester                                                 v1.2.2                                     099bbc460e1d6       328MB
docker.io/rancher/harvester                                                 v1.3.1                                     c61e8d5f76b77       331MB
docker.io/rancher/klipper-helm                                              v0.8.3-build20240228                       0929b4140ada6       256MB
docker.io/rancher/klipper-lb                                                v0.4.7                                     edc812b8e25d0       12.2MB
docker.io/rancher/kubectl                                                   v1.21.5                                    43e8b9390c725       46.7MB
docker.io/rancher/mirrored-banzaicloud-fluentd                              v1.14.6-alpine-5                           9aae16d37878a       221MB
docker.io/rancher/fleet-agent                                               <none>                                     f4bbcfabbdf74       114MB
docker.io/rancher/mirrored-banzaicloud-logging-operator                     3.17.10                                    eec68fd77ec94       22.4MB
docker.io/rancher/mirrored-cluster-api-controller                           v1.4.4                                     845f01a870ec2       78.1MB
docker.io/rancher/mirrored-fluent-fluent-bit                                1.9.5                                      5131c4e1af289       69MB
docker.io/rancher/mirrored-fluent-fluent-bit                                2.2.0                                      cd5b76149224a       87.4MB
docker.io/rancher/mirrored-grafana-grafana                                  9.1.5                                      0d9dace86a5c3       92.5MB
docker.io/rancher/mirrored-ingress-nginx-kube-webhook-certgen               v20230312-helm-chart-4.5.2-28-g66a760794   5a86b03a88d23       48.5MB
docker.io/rancher/mirrored-jimmidyson-configmap-reload                      v0.4.0                                     37e6075b1356c       10.9MB
docker.io/rancher/mirrored-kiwigrid-k8s-sidecar                             1.24.6                                     12bfdf6df7b01       83.9MB
docker.io/rancher/mirrored-kiwigrid-k8s-sidecar                             <none>                                     fd4332507a225       23.6MB
docker.io/rancher/mirrored-kube-state-metrics-kube-state-metrics            v2.6.0                                     ec6e2d871c544       12MB
docker.io/rancher/mirrored-library-busybox                                  1.31.1                                     1c35c44120825       765kB
docker.io/rancher/mirrored-library-nginx                                    1.24.0-alpine                              249f59e1dec7f       42.9MB
docker.io/rancher/mirrored-pause                                            3.6                                        6270bb605e12e       686kB
docker.io/rancher/pause                                                     3.6                                        6270bb605e12e       686kB
docker.io/rancher/mirrored-prometheus-adapter-prometheus-adapter            v0.10.0                                    e92afb5b902be       29.5MB
docker.io/rancher/mirrored-prometheus-alertmanager                          v0.25.0                                    c8568f914cd25       30.8MB
docker.io/rancher/mirrored-prometheus-alertmanager                          <none>                                     e556bd45e16c2       27.3MB
docker.io/rancher/mirrored-prometheus-node-exporter                         v1.3.1                                     1dbe0e9319764       22.3MB
docker.io/rancher/mirrored-prometheus-operator-prometheus-config-reloader   v0.65.1                                    27473df42d72c       5.2MB
docker.io/rancher/mirrored-prometheus-operator-prometheus-operator          v0.65.1                                    2a1fa9d2dda1a       57.5MB
docker.io/rancher/mirrored-sig-storage-snapshot-controller                  v6.2.1                                     1ef6c138bd5f2       58.4MB
<none>                                                                      <none>                                     395ff1b951853       419MB
<none>                                                                      <none>                                     3c8207b045e32       178MB
docker.io/rancher/nginx-ingress-controller                                  nginx-1.9.6-hardened1                      3f5b7fd2026e9       787MB
<none>                                                                      <none>                                     46e6854cb7c5e       48.8MB
<none>                                                                      <none>                                     4921f8cf3ec44       151MB
<none>                                                                      <none>                                     4e4f3ddc7424c       202MB
docker.io/rancher/rancher-agent                                             v2.7.6                                     ce617e51ded2c       492MB
docker.io/rancher/rancher-agent                                             v2.8.4                                     ed9ac6cfe6db5       519MB
docker.io/rancher/rancher                                                   v2.8.3                                     4f371bef5b3ce       2.26GB
docker.io/rancher/rke2-cloud-provider                                       v1.26.1-build20230210                      3e9d08b8ec142       174MB
docker.io/rancher/rke2-cloud-provider                                       v1.29.3-build20240412                      3525a3daa55c9       188MB
docker.io/rancher/support-bundle-kit                                        v0.0.38                                    385faeb1267ea       279MB
docker.io/rancher/system-agent                                              v0.3.6-suc                                 00511613dec56       100MB
ghcr.io/k8snetworkplumbingwg/whereabouts                                    v0.6.1-amd64                               2852369e5dee6       102MB
registry.k8s.io/sig-storage/snapshot-controller                             v6.3.3                                     4f642f162057e       61.2MB
registry.suse.com/suse/sles/15.5/virt-controller                            1.1.1-150500.8.15.1                        1eb4b14ae4e81       185MB
<none>                                                                      <none>                                     5006152466fef       218MB
registry.k8s.io/sig-storage/snapshot-validation-webhook                     v6.3.3                                     520d048805e05       51.4MB
<none>                                                                      <none>                                     53ae5b88a3380       56.5MB
<none>                                                                      <none>                                     53f2d6ac20fa1       415MB
docker.io/rancher/mirrored-prometheus-prometheus                            <none>                                     d3167094f2ef6       86.5MB
docker.io/rancher/shell                                                     <none>                                     5411540943b48       135MB
<none>                                                                      <none>                                     5f3ba5cea74bf       625MB
<none>                                                                      <none>                                     65ed3db14a8bd       415MB
<none>                                                                      <none>                                     6e154cda101f9       185MB
<none>                                                                      <none>                                     759a95aaa35df       184MB
docker.io/rancher/mirrored-prometheus-prometheus                            v2.42.0                                    8cfcb66f43649       234MB
<none>                                                                      <none>                                     926ba613321e0       128MB
<none>                                                                      <none>                                     94f72cff50767       184MB
<none>                                                                      <none>                                     9a88c4e760797       562MB
<none>                                                                      <none>                                     aae3bbe197486       163MB
<none>                                                                      <none>                                     b0ddd5b9ae345       94.2MB
docker.io/rancher/nginx-ingress-controller                                  nginx-1.9.3-hardened1                      bfdece8fa3f14       800MB
docker.io/rancher/rancher-webhook                                           v0.4.2                                     b49684953b3b9       81MB
docker.io/rancher/rancher-webhook                                           v0.4.3                                     7b5de84f3440b       72.9MB
docker.io/rancher/rancher                                                   v2.8.2                                     547f93d5b621b       2.15GB
docker.io/rancher/rke2-cloud-provider                                       v1.26.3-build20230406                      f906d1e7a5774       175MB
docker.io/rancher/rke2-runtime                                              v1.27.13-rke2r1                            f0f5aad06b40f       331MB
docker.io/rancher/shell                                                     v0.1.22                                    e9ca1dba2cccd       362MB
docker.io/rancher/shell                                                     v0.1.23                                    cf4efe61147d5       396MB
docker.io/rancher/system-agent                                              v0.3.4-suc                                 a1862edffc506       82.1MB
docker.io/rancher/system-upgrade-controller                                 v0.13.1                                    abc5338582c4f       33.7MB
ghcr.io/k8snetworkplumbingwg/whereabouts                                    v0.6.3                                     95601e6931ef0       104MB
ghcr.io/kube-vip/kube-vip-iptables                                          v0.6.0                                     636aff9a37178       49.7MB
registry.suse.com/bci/bci-base                                              15.5                                       a9657d58711e2       129MB
registry.suse.com/suse/sles/15.4/virt-api                                   0.54.0-150400.3.10.4                       e9b2ef85e2239       191MB
registry.suse.com/suse/sles/15.4/virt-handler                               0.54.0-150400.3.10.4                       cbf2a284be505       331MB
registry.suse.com/suse/sles/15.4/virt-operator                              0.54.0-150400.3.10.4                       e64c1e37a963f       190MB
registry.suse.com/suse/sles/15.5/virt-api                                   1.1.1-150500.8.15.1                        b91a76181e73b       190MB
registry.suse.com/suse/sles/15.5/virt-handler                               1.1.1-150500.8.15.1                        724be6af0f9ab       324MB
registry.suse.com/suse/sles/15.5/virt-launcher                              1.1.1-150500.8.15.1                        682a2559c2375       589MB
registry.suse.com/suse/sles/15.5/virt-operator                              1.1.1-150500.8.15.1                        87986b2b1ceb8       189MB
registry.suse.com/suse/vmdp/vmdp                                            2.5.4.2                                    90567499610d4       66.3MB
<none>                                                                      <none>                                     e801baf983d5b       765MB
docker.io/rancher/system-upgrade-controller                                 <none>                                     ec7902b691381       9.16MB
<none>                                                                      <none>                                     f70f099c6183f       282MB
<none>                                                                      <none>                                     ffd07315c2646       190MB