test: resolve fallback templates from the linuxcontainers catalog - #25
Draft
MickLesk wants to merge 4 commits into
Draft
test: resolve fallback templates from the linuxcontainers catalog#25MickLesk wants to merge 4 commits into
MickLesk wants to merge 4 commits into
Conversation
Every ARM64 container took the custom-template path, so pveam was never consulted on that architecture. For Debian that path resolved its URL from community-scripts/debian-arm64-lxc, a repository that does not exist: the releases endpoint answers 404, so ARM64 Debian could not be created at all through the split core. Template lookup now runs the same way on both architectures. Local templates first, then the catalog, both matched on OS, version and exact architecture. Only when Proxmox has nothing does the linuxcontainers.org build step in, which is still the only source for Ubuntu, Fedora and the rest on ARM64. Against a live catalog this routes debian 13 and alpine 3.24 through pveam on ARM64 -- Proxmox ships both -- while debian 12, ubuntu and fedora keep the old path. A local template short-circuits before any catalog read. The interactive "pick another version" fallback filtered by name only. On a host whose catalog carries both architectures, which is now the normal case, it could offer an amd64 template to an ARM64 host and fail later at creation. Supersedes the Debian-only routing in #5.
Image resolution tried up to six images: candidates over the network before looking at what was already copied locally, so an image on disk still cost round-trips and resolution failed outright on a host without internet. The local match was also a substring search over the whole CSV row: asking for debian/12 matched a debian/13 row uploaded on 2026/12/01, because the row contains "debian" and the date contains "12". That launched the wrong release with no error. It now compares the alias field whole.
The fallback only knew what arm64_template_variant() hardcoded: debian 12/13, ubuntu 24.04/26.04, alpine. Everything else exited 225, and the Jenkins URL it built is a legacy endpoint. Resolves against the simplestreams index instead, which is what Incus already uses. The index carries aliases (debian/13 -> trixie), so the mapping table is gone rather than extended. Opens up 22 distributions and 42 arm64 images against 2 arm64 templates in a live pveam catalog: almalinux, alt, amazonlinux, archlinux, busybox, centos, devuan, kali, mint, nixos, openeuler, opensuse, openwrt, oracle, plamo, rockylinux, slackware, voidlinux and the four already covered. Only reached when pveam has nothing, so amd64 behaviour is unchanged for anything Proxmox ships. Needs jq and installs it when missing. Verified against the live catalog: lookup returns correct paths for debian, ubuntu, alpine, rockylinux, fedora, archlinux and voidlinux, refuses unknown releases, and the resulting URLs are real tarballs (debian trixie arm64 86 MB, rockylinux 9 arm64 99 MB). Not run on a Proxmox host.
Contributor
Try this branchThe engine and the scripts resolve independently, so a production script can COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/community-scripts/core/test/linuxcontainers-full-catalog \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"Swap This PR touches both backends. Worth running on a Proxmox VE and an Incus host. Run a script from a fork as wellcurl -fsSL https://raw.githubusercontent.com/community-scripts/core/test/linuxcontainers-full-catalog/tools/run.sh |
bash -s -- https://raw.githubusercontent.com/YOU/ProxmoxVED/your-branch ct/debian.sh \
https://raw.githubusercontent.com/community-scripts/core/test/linuxcontainers-full-catalogNote that Useful flags while testing
|
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.
Spike, not for merge as-is. Builds on #23.
The linuxcontainers fallback only knew what
arm64_template_variant()hardcoded — debian 12/13, ubuntu 24.04/26.04, alpine — and built a legacy Jenkins URL. This resolves against the simplestreams index instead, the same source Incus uses. The index carries aliases (debian/13→trixie), so the mapping table is deleted rather than extended.That opens up 22 distributions and 42 arm64 images, against 2 arm64 templates in a live
pveamcatalog. Only reached when Proxmox has nothing, so amd64 is unchanged for anything it ships.Open questions before this is more than a spike: it needs
jqand installs it when missing; these images carry no Proxmox metadata; and everything outsidepveamis ours to support.