[pbs-devel] [PATCH v2 proxmox{-backup, } 0/3] Add boot_mode, improve kernel version

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Nov 24 15:45:05 CET 2023


Am 24/11/2023 um 15:18 schrieb Lukas Wagner:
> On 11/24/23 13:02, Gabriel Goller wrote:
>> Ported the recent changes from the PVE NodeSummary (done by @Thomas) to
>> the PBS NodeDashboard.
>>
>> It consists of:
>> * Adding the bootmode field, shows either Legacy BIOS, EFI, or EFI
>>      (Secure Boot)
>> * Declutter the kernel-version field and only show the release version
>>      and build-date.
>>
> 
> 
> Quickly tested this, seems to work fine.
> 
> Tested-by: Lukas Wagner <l.wagner at proxmox.com>


Thanks for patch and review to both, but IMO this is still differing to much
from Proxmox VE's endpoint without any real justification?

There the "boot-info" object with the required key "mode" and the optional
"secureboot" entry, that explicitly de-couples the general mode from some
mode-specific detail.

The fitting rust struct (at least in sys) would be

pub enum BootModeInformation {
    /// The BootMode is EFI/UEFI, the boolean specifies if secure boot is enabled
    Efi(bool),
    /// The BootMode is Legacy BIOS
    Bios,
}


or if one wants to be overly specific then something like:

pub enum SecureBoot {
    Enabled,
    Disabled,
}


pub enum BootModeInformation {
    /// The BootMode is EFI/UEFI
    Efi(SecureBoot),
    /// The BootMode is Legacy BIOS
    Bios,
}

(but could be overkill)

It's not a hard must to keep this the same for pve-manager and pbs, but IMO
one should have very good reason for changing the format for relaying the
exact same information between two products, such inconsistencies make it
harder to interact with our API for any users, or external devs, and also
won't make it easier to reuse widgets for the (current or future) UIs..





More information about the pbs-devel mailing list