Commissioning fails with binary data in IPMI Lan_Conf_Security_Keys

Bug #1929478 reported by Nobuto Murata
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
High
Seyeong Kim
3.2
Fix Released
Undecided
Anton Troyanov

Bug Description

maas 2.9/stable: 2.9.2-9165-g.c3e7848d1 2021-04-16 (12555) 149MB -

Commissioning process fails when the target server has binary data in the "Lan_Conf_Security_Keys" of IPMI.

How to reproduce:
1. Confirm Lan_Conf_Security_Keys:K_R returns some binary data instead of UTF-8 string. Some Huawei servers including FusionServer 2288H V5 do that out of the box.

$ bmc-config -D LAN_2_0 -u Administrator -p PASSWORD -h BMC_IP --checkout \
    -S Lan_Conf_Security_Keys

Section Lan_Conf_Security_Keys
        ## Give string or blank to clear. Max 20 chars
        K_R <BINARY_DATA>
        ## Give string or blank to clear. Max 20 bytes, prefix with 0x to enter hex
        K_G 0x0000000000000000000000000000000000000000

2. Commission the node with IPMI 2.0 power driver.

Then, the commissioning will fail and output the following traceback.

File "/tmp/user_data.sh.alJy2M/scripts/commissioning/30-maas-01-bmc-config", line 186, in _bmc_get_config
    for line in proc.stdout.decode().splitlines():
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x86 in position 20499: invalid start byte

Some related information:
https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1892983
https://bugs.launchpad.net/kunpeng920/+bug/1916565

Related branches

Revision history for this message
Nobuto Murata (nobuto) wrote :

A workaround is to clear out the key explicitly:
$ bmc-config -D LAN_2_0 -u Administrator -p PASSWORD -h BMC_IP --commit \
    --key-pair="Lan_Conf_Security_Keys:K_R="

Nobuto Murata (nobuto)
description: updated
Revision history for this message
Björn Tillenius (bjornt) wrote :

Lee, can you take a look at this?

Changed in maas:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Lee Trager (ltrager)
Changed in maas:
assignee: Lee Trager (ltrager) → nobody
Revision history for this message
dann frazier (dannf) wrote :

Is this a duplicate of bug 1916565?

Changed in maas:
milestone: none → 3.3.0
status: Triaged → Fix Committed
Changed in maas:
assignee: nobody → Seyeong Kim (seyeongkim)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers