Skip to content
  • mark.b@hostdime.com's avatar
    18044e8d
    IPMIToolkit 2.10: clear network config, user accounts, X8 NIC mode · 18044e8d
    mark.b@hostdime.com authored
    Ports the capabilities the older in-house Python IPMI script had that the
    rework did not carry over.
    
    Menu 4, clear network configuration. Zeroes the address, netmask and gateway,
    which is how a board is handed back before it leaves the rack or changes
    subnet. The current values are shown first, and the read-back distinguishes
    0.0.0.0 from an empty read - the BMC not answering is not the same as cleared.
    A live 802.1q tag is reported with an offer to remove it: a tag survives an
    address wipe, and a re-addressed BMC still tagged for the previous customer
    presents as a dead BMC. Users, passwords and NIC mode are left alone.
    
    Menu 7, user accounts. Add or overwrite any ID with any name and privilege,
    set a password on any ID, enable, disable - for the accounts this fleet does
    not own. The ID is range-checked against the maximum from 'user summary',
    names are held to IPMI's 16-byte cap, an occupied ID is named before it is
    overwritten, and ID 1 is refused for naming: it is the anonymous/null user and
    naming it stops every account authenticating on some firmware, so disable is
    offered instead. ipmi_user_name() reads the name by column rather than by
    field - an unnamed slot prints nothing in the name column, so field 2 is the
    Callin value and every empty slot would read as a user called 'true'.
    
    apply_new_password() is factored out of ipmi_password_reset so there is one
    place a password is written, verified with 'user test' and dropped. Menu 8
    stays as the fast path for hdview and hdroot.
    
    BMC NIC mode was only ever sent and decoded in the X9-and-later one-byte form.
    X8 takes two bytes - manual/auto, then the port - so dedicated is 1 1 0 there
    against 1 0, shared 1 1 1 against 1 1, failover 1 0 against 1 2. That was also
    a reporting bug and the worse half of it: a bare 00 reply means Dedicated on
    X9+ and Failover on X8, so the menu panel and the configuration view read X8
    boards backwards. board_generation() now drives both directions from the
    baseboard product name; an unrecognised board is treated as modern and the
    menu says which form it is using. The X8 byte sequences come from the Python
    script and are not verified on an X8 board here - the existing post-change
    read-back is the guard.
    
    Menu 2 gains system and baseboard manufacturer and product, and BIOS vendor,
    version and date. dmi_field() normalises the SMBIOS placeholders ("To be
    filled by O.E.M.", "Not Specified", "Default string") to unknown rather than
    printing them as answers, and dmi_pair() drops the unknown half instead of
    rendering "Supermicro unknown". board_model() goes through it too, with a
    guard so a placeholder cannot reach the download-centre URL.
    
    Menu renumbered to 1-10 to keep the new entries beside the ones they belong
    with. No CLI flags changed.
    18044e8d
    IPMIToolkit 2.10: clear network config, user accounts, X8 NIC mode
    mark.b@hostdime.com authored
    Ports the capabilities the older in-house Python IPMI script had that the
    rework did not carry over.
    
    Menu 4, clear network configuration. Zeroes the address, netmask and gateway,
    which is how a board is handed back before it leaves the rack or changes
    subnet. The current values are shown first, and the read-back distinguishes
    0.0.0.0 from an empty read - the BMC not answering is not the same as cleared.
    A live 802.1q tag is reported with an offer to remove it: a tag survives an
    address wipe, and a re-addressed BMC still tagged for the previous customer
    presents as a dead BMC. Users, passwords and NIC mode are left alone.
    
    Menu 7, user accounts. Add or overwrite any ID with any name and privilege,
    set a password on any ID, enable, disable - for the accounts this fleet does
    not own. The ID is range-checked against the maximum from 'user summary',
    names are held to IPMI's 16-byte cap, an occupied ID is named before it is
    overwritten, and ID 1 is refused for naming: it is the anonymous/null user and
    naming it stops every account authenticating on some firmware, so disable is
    offered instead. ipmi_user_name() reads the name by column rather than by
    field - an unnamed slot prints nothing in the name column, so field 2 is the
    Callin value and every empty slot would read as a user called 'true'.
    
    apply_new_password() is factored out of ipmi_password_reset so there is one
    place a password is written, verified with 'user test' and dropped. Menu 8
    stays as the fast path for hdview and hdroot.
    
    BMC NIC mode was only ever sent and decoded in the X9-and-later one-byte form.
    X8 takes two bytes - manual/auto, then the port - so dedicated is 1 1 0 there
    against 1 0, shared 1 1 1 against 1 1, failover 1 0 against 1 2. That was also
    a reporting bug and the worse half of it: a bare 00 reply means Dedicated on
    X9+ and Failover on X8, so the menu panel and the configuration view read X8
    boards backwards. board_generation() now drives both directions from the
    baseboard product name; an unrecognised board is treated as modern and the
    menu says which form it is using. The X8 byte sequences come from the Python
    script and are not verified on an X8 board here - the existing post-change
    read-back is the guard.
    
    Menu 2 gains system and baseboard manufacturer and product, and BIOS vendor,
    version and date. dmi_field() normalises the SMBIOS placeholders ("To be
    filled by O.E.M.", "Not Specified", "Default string") to unknown rather than
    printing them as answers, and dmi_pair() drops the unknown half instead of
    rendering "Supermicro unknown". board_model() goes through it too, with a
    guard so a placeholder cannot reach the download-centre URL.
    
    Menu renumbered to 1-10 to keep the new entries beside the ones they belong
    with. No CLI flags changed.
Loading