Draft
Conversation
majst01
commented
Jul 16, 2025
2 tasks
majst01
commented
Jul 16, 2025
majst01
commented
Jul 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
First microservice which gets migrated to MEP-4
Closes: #23
TODO:
Tested in mini-lab with this output:
bin/metal-image-cache-sync --metal-apiserver-token eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwOi8vdjIuYXBpLjE3Mi4xNy4wLjEubmlwLmlvOjgwODAiLCJzdWIiOiJDaVF3TURBd01EQXdNQzB3TURBd0xUQXdNREF0TURBd01DMHdNREF3TURBd01EQXdNREVTQld4dlkyRnNAb2lkYyIsImV4cCI6MTc1MDQ2MDAwMCwibmJmIjoxNzUwNDMxMjAwLCJpYXQiOjE3NTA0MzEyMDAsImp0aSI6IjI2YjcwMDFlLTkxNjYtNDcwOS05MjYyLTUxZjk1NTFiYmNiNCIsInR5cGUiOiJUT0tFTl9UWVBFX0NPTlNPTEUifQ.AT9oLTE-IXSUxZpaStJxwbHmyCRFs_ehW5BWOYR0aynxLc-iuItm5Mjncb3YUCWEhIP_AxMv6633MkajcqkX_V7WAOF22RZrRKodkDTGv2WJBWYDFrVtrsUqWpKjMuRr0UPrVQXOuvX8ABjjPgizXy0jKA2vMdsAwsCSlQwXGWsXtR0_ --metal-apiserver-url http://v2.api.172.17.0.1.nip.io:8080 --cache-root-path /tmp {"time":"2025-06-20T17:02:47.776421354+02:00","level":"INFO","msg":"start metal stack image sync","version":"migrate-to-metal-apiserver (605223d9), heads/migrate-to-metal-apiserver-0-g605223d, 2025-06-20T17:01:50+02:00, go1.24.4"} {"time":"2025-06-20T17:02:47.776556957+02:00","level":"INFO","msg":"starting to serve files","bind-address":"0.0.0.0:3000","directory":"/tmp/images"} {"time":"2025-06-20T17:02:47.776661824+02:00","level":"INFO","msg":"starting to serve files","bind-address":"0.0.0.0:3001","directory":"/tmp/kernels"} {"time":"2025-06-20T17:02:47.776731555+02:00","level":"INFO","msg":"starting to serve files","bind-address":"0.0.0.0:3002","directory":"/tmp/boot-images"} {"time":"2025-06-20T17:02:49.166192125+02:00","level":"WARN","msg":"cannot reduce anymore images (all at minimum size), exceeding maximum cache size"} {"time":"2025-06-20T17:02:49.166261777+02:00","level":"INFO","msg":"sync plan","syncer":{"amount":3,"cache-size-after-sync":"1.527GiB"}} ┌─────────────────────┬─────────────────────────────────────────────────┬─────────┬──────────┐ │ ID │ PATH │ SIZE │ ACTION │ ├─────────────────────┼─────────────────────────────────────────────────┼─────────┼──────────┤ │ debian-12.0 │ metal-os/stable/debian/12/img.tar.lz4 │ 482.1MB │ download │ │ firewall-ubuntu-3.0 │ metal-os/stable/firewall/3.0-ubuntu/img.tar.lz4 │ 654.1MB │ download │ │ ubuntu-24.4 │ metal-os/stable/ubuntu/24.04/img.tar.lz4 │ 503.3MB │ download │ └─────────────────────┴─────────────────────────────────────────────────┴─────────┴──────────┘ {"time":"2025-06-20T17:02:49.166878885+02:00","level":"INFO","msg":"downloading file","syncer":{"id":"debian-12.0","key":"metal-os/stable/debian/12/img.tar.lz4","size":482149203,"to":"/tmp/tmp/tmp"}} {"time":"2025-06-20T17:03:29.081186289+02:00","level":"INFO","msg":"downloading md5 checksum","syncer":{"id":"debian-12.0","key":"metal-os/stable/debian/12/img.tar.lz4","to":"/tmp/images/metal-os/stable/debian/12/img.tar.lz4.md5"}} {"time":"2025-06-20T17:03:29.139434343+02:00","level":"INFO","msg":"downloading file","syncer":{"id":"firewall-ubuntu-3.0","key":"metal-os/stable/firewall/3.0-ubuntu/img.tar.lz4","size":654080673,"to":"/tmp/tmp/tmp"}} {"time":"2025-06-20T17:04:23.369369117+02:00","level":"INFO","msg":"downloading md5 checksum","syncer":{"id":"firewall-ubuntu-3.0","key":"metal-os/stable/firewall/3.0-ubuntu/img.tar.lz4","to":"/tmp/images/metal-os/stable/firewall/3.0-ubuntu/img.tar.lz4.md5"}} {"time":"2025-06-20T17:04:23.436291878+02:00","level":"INFO","msg":"downloading file","syncer":{"id":"ubuntu-24.4","key":"metal-os/stable/ubuntu/24.04/img.tar.lz4","size":503291842,"to":"/tmp/tmp/tmp"}} {"time":"2025-06-20T17:05:06.701310056+02:00","level":"INFO","msg":"downloading md5 checksum","syncer":{"id":"ubuntu-24.4","key":"metal-os/stable/ubuntu/24.04/img.tar.lz4","to":"/tmp/images/metal-os/stable/ubuntu/24.04/img.tar.lz4.md5"}} {"time":"2025-06-20T17:05:07.686407408+02:00","level":"INFO","msg":"sync plan","syncer":{"amount":1,"cache-size-after-sync":"8.72MiB"}} ┌────────────┬──────────────────────────────────────────────────────────────┬─────────┬──────────┐ │ ID │ PATH │ SIZE │ ACTION │ ├────────────┼──────────────────────────────────────────────────────────────┼─────────┼──────────┤ │ 6.12.32-93 │ metal-stack/kernel/releases/download/6.12.32-93/metal-kernel │ 9.143MB │ download │ └────────────┴──────────────────────────────────────────────────────────────┴─────────┴──────────┘ {"time":"2025-06-20T17:05:07.688278986+02:00","level":"INFO","msg":"downloading file","syncer":{"id":"6.12.32-93","key":"metal-stack/kernel/releases/download/6.12.32-93/metal-kernel","size":9143296,"to":"/tmp/tmp/tmp"}} {"time":"2025-06-20T17:05:10.411025673+02:00","level":"INFO","msg":"sync plan","syncer":{"amount":1,"cache-size-after-sync":"58.4MiB"}} ┌─────────┬─────────────────────────────────────────────────────────────────────────────────┬─────────┬──────────┐ │ ID │ PATH │ SIZE │ ACTION │ ├─────────┼─────────────────────────────────────────────────────────────────────────────────┼─────────┼──────────┤ │ 0.13.11 │ metal-stack/metal-hammer/releases/download/v0.13.11/metal-hammer-initrd.img.lz4 │ 61.24MB │ download │ └─────────┴─────────────────────────────────────────────────────────────────────────────────┴─────────┴──────────┘ {"time":"2025-06-20T17:05:10.411515666+02:00","level":"INFO","msg":"downloading file","syncer":{"id":"0.13.11","key":"metal-stack/metal-hammer/releases/download/v0.13.11/metal-hammer-initrd.img.lz4","size":61241660,"to":"/tmp/tmp/tmp"}} {"time":"2025-06-20T17:05:15.814912146+02:00","level":"INFO","msg":"downloading md5 checksum","syncer":{"id":"0.13.11","key":"metal-stack/metal-hammer/releases/download/v0.13.11/metal-hammer-initrd.img.lz4","to":"/tmp/boot-images/metal-stack/metal-hammer/releases/download/v0.13.11/metal-hammer-initrd.img.lz4.md5"}} {"time":"2025-06-20T17:05:16.266958184+02:00","level":"INFO","msg":"scheduling next sync","at":"2025-06-20 17:10:00 +0200 CEST"}The temporäry output seems a bit weird though: "to":"/tmp/tmp/tmp"