I am using MAAS 3.0 to deploy several HUAWEI RH1288 matal server. I got the following output when running 30-maas-01-bmc-config script
Traceback (most recent call last):
File "/tmp/user_data.sh.edb3yA/scripts/commissioning/30-maas-01-bmc-config", line 1145, in <module>
main()
File "/tmp/user_data.sh.edb3yA/scripts/commissioning/30-maas-01-bmc-config", line 1141, in main
detect_and_configure(args, bmc_config_path)
File "/tmp/user_data.sh.edb3yA/scripts/commissioning/30-maas-01-bmc-config", line 1034, in detect_and_configure
bmc.configure()
File "/tmp/user_data.sh.edb3yA/scripts/commissioning/30-maas-01-bmc-config", line 666, in configure
self._bmc_get_config()
File "/tmp/user_data.sh.edb3yA/scripts/commissioning/30-maas-01-bmc-config", line 193, in _bmc_get_config
for line in proc.stdout.decode().splitlines():
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfb in position 20490: invalid start byte
I’m geting the same problem with maas 2.9.2. with HUAWEI XH321.
INFO: Loading IPMI kernel modules…
INFO: Checking for HP Moonshot…
INFO: Checking for IPMI…
INFO: IPMI detected!
INFO: Reading current IPMI BMC values…
Traceback (most recent call last):
File “./30-maas-01-bmc-config.py”, line 1222, in
main()
File “./30-maas-01-bmc-config.py”, line 1218, in main
detect_and_configure(args, bmc_config_path)
File “./30-maas-01-bmc-config.py”, line 1111, in detect_and_configure
bmc.configure()
File “./30-maas-01-bmc-config.py”, line 752, in configure
self._bmc_get_config()
File “./30-maas-01-bmc-config.py”, line 186, in _bmc_get_config
for line in proc.stdout.decode().splitlines():
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xe6 in position 20491: invalid continuation byte
I’ve found the problem. At least with my HUAWEI machines. When the commision script runs
bmc-config --checkout some odd characters can be found in the section Lan_Conf_Security_Keys
Section Lan_Conf_Security_Keys
## Give string or blank to clear. Max 20 chars
K_R. Ó¶: Î <81>, ^ BØ¡ ^] æZ <9b> <97> ^ E * òN «<9b>
## Give string or blank to clear. Max 20 bytes, prefix with 0x to enter hex
K_G 0x00000000000000000000000000000000000000000000
EndSection
The commissioning script 30-maas-01-bmc-config can’t handle it.
It can be reset using ipmi-config. But after a restart of BMC, the string is back.
1) Create a txt file as
$ cat test.txt
Section Lan_Conf_Security_Keys
## Give string or blank to clear. Max 20 chars
K_R
## Give string or blank to clear. Max 20 bytes, prefix with 0x to enter hex
K_G 0x0000000000000000000000000000000000000000
EndSection
2) use `ipmi-config` and update into BMC
$ sudo ipmi-config --commit --lan-channel-number 1 --filename=test.txt