Skip to content

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

Description

@hcaldicott

Hi all,

Second one with me with another fix via PR inbound.

Problem

Bootimus exposes bootloader_set on clients and client groups, and the client UI describes it as an override of the global bootloader set. However when I went to use it - it no worky. Seems it might not have been fully fleshed out. Again - something I need for my use-case.

Via the UI, the selected value is persisted and displayed, but it is not consulted by proxyDHCP, TFTP, or HTTP when serving the initial bootloader. Every client therefore receives the default active bootloader set.

This remains reproducible on v0.1.74 / current main (3fb7002).

Steps to reproduce

  1. Enable Bootimus's built-in proxyDHCP server.
  2. Leave the globally active bootloader set as default.
  3. Create another bootloader set, for example custom, with a distinct UEFI bootloader or manifest filename.
  4. Edit a known client and select custom in Bootloader Set.
  5. PXE boot that client and inspect the proxyDHCP/TFTP log.

Expected behaviour

The effective set should be resolved as:

  1. client bootloader_set
  2. client-group bootloader_set
  3. globally active set

The client should receive the initial bootloader from the effective set.

Actual behaviour

The client and group values are never read by the boot-serving path. The log shows the globally active set and its filename being advertised and served.

Root cause

BootloaderSet is handled by the models, storage layer, API, and UI, but the runtime boot path calls only GetActiveBootloaderSet().

The existing proxyDHCP callback is global and does not receive the requesting client's MAC address. The subsequent TFTP request also lacks the database client identity, so the selected set needs to be carried in the advertised boot filename.

Proposed fix

  • Pass the PXE client's hardware address to the proxyDHCP bootfile callback.
  • Resolve client, then client-group, then global set precedence.
  • For client/group overrides, advertise a set-qualified path such as bootloader-sets/custom/bootimus.efi.
  • Teach TFTP and HTTP bootloader serving to resolve that qualified path while preserving existing unqualified/global behaviour.
  • Continue to fall back to the built-in default files when a selected custom set omits a file.
  • Document that MAC-specific selection requires the built-in proxyDHCP server; external DHCP configurations remain global/static.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions