python-ipmi icon indicating copy to clipboard operation
python-ipmi copied to clipboard

get_fru_inventory() fails with DecodingError('checksum failed')

Open suaveolent opened this issue 11 months ago • 8 comments

Hi,

I have an Asrock Rack board. When trying to call connection.get_fru_inventory() it fails to parse the CommonInfoArea at:

pyipmi/fru.py", line 225, in _from_data
    raise DecodingError('checksum failed')
pyipmi.errors.DecodingError: checksum failed

If i uncomment this check it works without any problems:

if sum(data[:self.length]) % 256 != 0:

Data going into CommonInfoArea is

b'\x01\x03\x00vq\xb4\xcaASRockRack\xc0\xc0\xc0\xc0\xc1\x00\x1b

Output of connection.read_fru_data()

b'\x01\x00\x00\x01\x04\x00\x00\xfa\x01\x03\x00vq\xb4\xcaASRockRack\xc0\xc0\xc0\xc0\xc1\x00\x1b\x01\x03\x00\xcaASRockRack\xc0\xc0\xc0\xc0\xc0\xc0\xc1\x00\x00M\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

Can you help me with that issue?

suaveolent avatar Jan 10 '25 11:01 suaveolent

Sounds like the FRU data is broken (the last byte of the area is not correct).

hthiery avatar Jan 10 '25 12:01 hthiery

Thanks for your quick reply. So this would be an issue with my board?

suaveolent avatar Jan 10 '25 12:01 suaveolent

Thanks for your quick reply. So this would be an issue with my board?

At this point I would say yes. Do you know if the ipmitool can print the FRU data without error?

hthiery avatar Jan 13 '25 10:01 hthiery

At this point I would say yes. Do you know if the ipmitool can print the FRU data without error?

Yes, ipmitool seems to be able to read fru data:

FRU Device Description : Builtin FRU Device (ID 0)
 Board Mfg Date        : Tue 26 Jun 2018 06:06:00 CEST CEST
 Board Mfg             : ASRockRack
 Product Manufacturer  : ASRockRack

suaveolent avatar Jan 15 '25 13:01 suaveolent

At this point I would say yes. Do you know if the ipmitool can print the FRU data without error?

Yes, ipmitool seems to be able to read fru data:

FRU Device Description : Builtin FRU Device (ID 0)
 Board Mfg Date        : Tue 26 Jun 2018 06:06:00 CEST CEST
 Board Mfg             : ASRockRack
 Product Manufacturer  : ASRockRack

what version of ipmitool you are using?

hthiery avatar Jan 15 '25 13:01 hthiery

The check in ipmitool is added here: https://codeberg.org/IPMITool/ipmitool/commit/63d59a50a6809e415cd7d8915533f236f28865f3

With that you should also see the problem on your fru data

hthiery avatar Jan 15 '25 13:01 hthiery

The check in ipmitool is added here: https://codeberg.org/IPMITool/ipmitool/commit/63d59a50a6809e415cd7d8915533f236f28865f3

With that you should also see the problem on your fru data

I am running version version 1.8.19 using this command

 ipmitool -I lanplus -H <host> -U <username> -P <password fru

which results in the above mentioned output.

suaveolent avatar Jan 15 '25 17:01 suaveolent

I introduced connection.get_fru_inventory(ignore_checksum=True). Please check if that helps.

hthiery avatar May 08 '25 12:05 hthiery