Skip to content

Apply per-client bootloader set overrides - #115

Open
hcaldicott wants to merge 9 commits into
garybowers:mainfrom
hcaldicott:agent/fix-per-client-bootloader-selection
Open

Apply per-client bootloader set overrides#115
hcaldicott wants to merge 9 commits into
garybowers:mainfrom
hcaldicott:agent/fix-per-client-bootloader-selection

Conversation

@hcaldicott

@hcaldicott hcaldicott commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • apply bootloader-set precedence as client, client group, then global
  • pass the requesting PXE MAC into the proxyDHCP bootfile selector
  • carry client-specific selections into TFTP/HTTP with set-qualified paths
  • retain existing unqualified global behaviour and built-in file fallback
  • document the built-in proxyDHCP requirement for MAC-specific selection

Root cause

The client and client-group bootloader_set fields are persisted and exposed
by the UI, but the boot-serving path only consults GetActiveBootloaderSet().
Consequently, the per-client override advertised in the v0.1.13 release notes
has no effect during PXE boot.

proxyDHCP knows the requesting MAC, while the later TFTP request only carries a
filename. This change resolves the effective set during proxyDHCP and advertises
a path such as bootloader-sets/custom/bootimus.efi, preserving that choice for
the subsequent transfer.

Unqualified requests continue to resolve through the global active set, so
external DHCP configurations retain their existing behaviour.

Validation

  • gofmt -l .
  • go vet ./...
  • go test ./...
  • go test -race ./internal/proxydhcp ./internal/server
  • go build ./...
  • GOOS=windows GOARCH=amd64 go build ./...
  • GOOS=darwin GOARCH=arm64 go build ./...

Fixes #116. Related global bootloader/proxyDHCP wiring: #78 and #96.

@hcaldicott

Copy link
Copy Markdown
Author

GPT 5.6 was used in this PR, however I have completed a manual (human) review of the codebase. I (personally) am happy with the changes here and feel they're as minimal as possible to implement the given functionality. I am still pulling apart the unit tests though and validating them.

@hcaldicott
hcaldicott marked this pull request as ready for review August 11, 2026 05:23
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.

Per-client and client-group bootloader-set overrides are stored but not applied during PXE boot

1 participant