Repository navigation
Conversation
The operator sends install-registry (the logical registry, its real endpoints and their credentials) with every install that pulls a system-uri, but only the KubeOS backend used it. The toolkit backend handed the system-uri to elemental install as it was: no credentials, a logical cpaas-registry.cpaas-system address no host resolves, and a pull that only fails after the disk was partitioned. The recovery partition also got the live system, since the toolkit sets the recovery source before it reads the environment. With install-registry, the toolkit install now: - writes the dockerconfigjson to /run/elemental/registry-docker (0700, config.json 0600) and runs elemental install with DOCKER_CONFIG there, since go-containerregistry does not read registries.conf; - keeps a system-uri that names a real registry, and rewrites one under the logical registry to the first endpoint that serves the image; - checks the image with a manifest HEAD (HTTPS without certificate verification, plain HTTP when HTTPS cannot be spoken, Bearer or Basic authentication) before any disk is touched; - passes --tls-verify=false, as install-registry endpoints are never verified; - removes the credentials once elemental install returns. elemental install also gets ELEMENTAL_INSTALL_RECOVERY_SYSTEM equal to the system-uri whenever one is set, so the toolkit snapshots the installed system for recovery instead of copying the live system. The register declares the new protocol level MsgToolkitInstallRegistry (19, never sent as a message) so the operator can tell it from a register that would partition first. Without install-registry nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picking the install disk released the install at the next registration, so spec.network had to be written in the same patch, a wrong pick could not be taken back, and nothing said "ready to install". The disk, the installed network and the system image are now prepared first and the install is released by an approval: - baremetal.alauda.io/install-target-device only selects the disk. It stays across live boots and is checked against the disks of the boot the install is approved in; it is removed once the installed system registers. - baremetal.alauda.io/install-approved: "true" releases the install with what the MachineInventory holds at that moment. It is one-shot: it is consumed by the release and discarded (ApprovalDiscarded) when it was set before this live boot registered, is not "true", comes without a selection, or the selected disk cannot be installed to; the selection then stays. A discard that runs into a concurrent change still removes it. Templates and hosts cannot set it. - A host with a selection and no approval waits with InstallTargetReady reason AwaitingApproval and says which disk is selected, or why it will not do. This applies to every inventory-mode registration, optical media too. MachineInventory gets spec.install with system-uri: it overrides the registration's install.system-uri for that host. The cpaas.io/registry-reference label of the MachineInventory, when present, selects the install's registry credentials over the registration's. An install from a system-uri by the toolkit is not released to a live system whose register predates MsgToolkitInstallRegistry: such a register ignores install-registry and its toolkit partitions before it pulls. The host is held (LiveTooOld, also in status.install.message) and an approval is discarded; a legacy-mode client that cannot be held gets an error instead. KubeOS installs are not affected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…again A selection now stays across live boots, but an unidentified: ID names a disk by its kernel path in the live boot that reported it: after a reboot the same ID may name another disk, and an approval would then install to it. When a new live boot registers, such a selection is discarded (InstallTargetReady reason SelectionDiscarded, event SelectionDiscarded) together with any approval, and the host waits for a disk to be picked again. Selections by stable IDs (wwn:, nvme-eui:, nvme-nguid:, serial:) still carry over. The discard retries on conflicts like the approval's, so the next registration of the boot never sees the stale selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A system-uri was checked and pulled without certificate verification only through install-registry. On a platform that does not pull through a mirror the operator sends none, and the toolkit then pulled with certificate verification and no check beforehand: a registry with a self-signed certificate failed the install after the disk was partitioned. Without install-registry the toolkit install now pulls the system-uri as written, anonymously, with --tls-verify=false, after the same manifest check before any disk is touched. A system-uri under the logical registry cannot be reached that way and fails the install before the disk is touched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wgkingk
marked this pull request as draft
November 25, 2026 02:23
…sters The release no longer consumes the install-target selection, so it must go when the installed system registers. settleInstall only did that for an install it still had to settle (Installing, Failed, or a wait in the live ISO). The usual end of an install is different: the host reports the install Installed before it reboots, and the installed system then registers with nothing left to settle. The selection stayed on the MachineInventory. Found on KVM with a network-booted host: after the install the installed system registered from its static address and the selection was still there. An installed system's registration (one with registration state) now removes the selection and any approval whatever the install phase; status is only settled as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The approval was consumed before the release configuration resolved the registry mirror input of install.system-uri. Input that could not be used then failed the configuration: the approval was gone and the inventory only showed that the install did not complete, with the cause in the host's log. The release now resolves the input first and sends what it resolved. Input that is missing or does not validate, or a system-uri under the logical registry with no mirror input, discards the approval and holds the host with RegistryInputInvalid and the cause on InstallTargetReady; the selection stays. A transient API error keeps the approval and holds the host for a short retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wgkingk
changed the base branch from
1.9.1-alauda-4.5-pxe
to
1.9.1-alauda-4.6
November 27, 2026 08:14
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.
Draft: test version, not to be merged for now (see the end).
Target branch:
1.9.1-alauda-4.5-pxe, the maintenance branch for bare-metal network installs (PXE / UEFI HTTP Boot) on the ACP 4.5 line, cut from1.9.1-alauda-4.5at059221bc. It is not merged back into1.9.1-alauda-4.5for now.Design: cluster-management-docs
docs/baremetal-pxe/(02 D4 install approval, D5 install fromsystem-uri; 04 F1–F5).A network-booted host runs the same live system as the ISO, but its install should write the product OS image to disk, not the live system, and it should only start once a person has prepared everything. Two gaps stood in the way:
install-registry: no credentials, a logicalcpaas-registry.cpaas-systemaddress no host resolves, a pull that only fails after the disk was partitioned, and the live system on the recovery partition.spec.networkhad to be in the same patch and a wrong pick could not be taken back.What
9fc83f7bfeat(install): toolkit installs pullinstall.system-urithroughinstall-registry./run/elemental/registry-docker(0700,config.json0600).elemental installruns withDOCKER_CONFIGpointing there, and the directory is removed once it returns.system-uriis kept as it is. One under the logical registry is rewritten to the first endpoint that serves the image.net/http, so go-containerregistry is not added to vendor.--tls-verify=falseis passed, andELEMENTAL_INSTALL_RECOVERY_SYSTEMis set to the same image whenever there is asystem-uri.MsgToolkitInstallRegistry(19). It is a capability marker only and never sent as a message.80f142ebfeat(server): explicit install approval.baremetal.alauda.io/install-approved: "true"releases the install with what the MachineInventory holds at that moment. It is one-shot and holds for the current live boot. It is discarded (ApprovalDiscarded) when it was set before the boot registered, is not"true", comes without a selection, or the selected disk cannot be used.install-target-deviceonly selects the disk and stays across live boots. A host that has a selection but no approval waits withAwaitingApproval.MachineInventory.spec.install.system-urioverrides the registration's value.cpaas.io/registry-referencelabel overrides the registration's.system-uri(LiveTooOld, also written tostatus.install.message). KubeOS is not affected.2979a7f4fix(server): a selection by anunidentified:ID, which names a disk by its kernel path in one boot, is discarded when the live ISO boots again (SelectionDiscarded).842a21fafix(server): an installed system's registration removes the selection even when the install already reported itself Installed (found on KVM: the selection stayed after a normal install).5fdb9683fix(server): the registry mirror input ofsystem-uriis resolved before the approval is consumed, and the release sends what it resolved (found on KVM: input missing an endpoint's credentials failed the release configuration after the approval was gone, and the inventory did not say why).system-uriwith no mirror input, discards the approval and holds the host with the new reasonRegistryInputInvalidand the cause onInstallTargetReady. The selection stays; the install is approved again once the input is fixed.228a6841feat(install): withoutinstall-registry(a platform that does not pull through a mirror), thesystem-uriis pulled anonymously, also without certificate verification and after the same check.spec.install, and the MachineRegistrationdevice-selectiondescription.Testing
GOFLAGS=-mod=mod, envtest assets from the provider'sbin/k8s/1.32.0-linux-amd64:New and updated cases:
pkg/install: a fake registry with a token service, Basic auth or none, over HTTPS and HTTP. Covered:system-uriforms with and withoutdocker:/docker://, logical rewrite with failover, every endpoint failing, wrong credentials, noinstall-registry. Each failure case asserts that no disk was touched and no install ran. Also covered: credential permissions, cleanup after success and after an install failure, and reference parsing.pkg/elementalcli:RECOVERY_SYSTEM,DOCKER_CONFIG,--tls-verify=false.pkg/server:"true", an approval without a selection, an invalid selection, a conflict while consuming or discarding, and templates or hosts trying to set it.unidentified:selections across boots.spec.install,spec.network, label).system-uriwithout mirror input (eachRegistryInputInvalid, approval discarded, selection kept, released after the fix and a new approval), and a transient read error (approval kept, 5-second retry).Tested on KVM on 2026-11-25 with network-booted hosts (iPXE), a Global running the provider test build (acp/cluster-api-provider-baremetal!71) and an M55 image whose register is built from this branch: approval flow, old-client protection, toolkit pull through install-registry (real address and logical prefix with failover, inventory label override), recovery from the same image,
spec.network(single NIC, bond), boot from disk afterwards, and a node joining a cluster. Re-tested with5fdb9683: an inventory label naming a missing credential, and credentials missing the first endpoint, each held the host withRegistryInputInvalidand the cause, discarded the approval and kept the selection, with the disk untouched; after the fix a new approval installed the host.Other halves
pxe-4.5). Its webhook validates the approval (and requiresmachineinventories/installtarget),spec.networkandspec.install. It also pins and syncs the CRD.Not to be merged for now. The
pxe-4.5line uses this PR's head as a test version: the provider pins the head (now5fdb9683) directly, and the image build fetches it by SHA. Push new commits here and re-pin the provider; do not merge until that is decided.🤖 Generated with Claude Code