Closed taih304 closed 1 year ago
Thank you for the detail and debug work. Yes, adding the check for netfn 0x06 or 0x07 + command 0x34 should resolve this issue.
I have applied a fix to lib/lanplus/lanplus.c in github now. If you want me to do a build for it, let me know which OS.
Awesome, the patch can fix the issue. Please build it for linux and window. Thank you, really appreciate your help
Getting back to this. Didn't I send you the binary? Here is one for Linux CentOS7:
https://ipmiutil.sourceforge.net/FILES/ipmiutil-3.1.9-3.el7.x86_64.rpm
Thanks a lot, closing this issue
I guess this gonna be a long description but stick with me.
The command I used for upgrade hpm
ipmiutil hpm upgrade <rom.hpm file> all -N $BMC_IP -U $BMC_USER -P $BMC_PASSWD -F lan2 -z 255
What is the behaviors ? After enter the command and press yes to commence the progress, ipmiutil jump to the part where it send (cmd get upgrade status: 0x34, netfn: 0x2c) and it stuck here, after 4 retries (in function
ipmi_lanplus_send_payload
), ipmiutil send the close session command while the bmc is still in upgrade progress resulting in failure upgrade sequence. Please check the debug log for details debug.txtSo what happen here ? If you take a look in the debug log, you can see the 0x34 command did get the response from BMC but after that this log pops out
which mean this 0x34 command get treated as bridge command, so in this specific block of code here
The function
ipmi_lan_poll_recv
get called recursively again but BMC doesn't respond until it get the next request that's why in the next iteration the response is NULL resulting in the retry process and then close session.So the issue lies in that if function which it check specifically for 0x34 command, I put some code to bypass that if function and can upgrade hpm successfully. Therefore I think we need some extra logic in this if function so it won't be mistaken with the get upgrade status command (netfn: 0x2c, command: 0x34).
I don't fully understand the bridge feature in IPMI but I know that this (netfn: 0x2c, command: 0x34) has nothing to do with it. I also take a look in this commit from ipmitool repo link and I think we need to add the check for netfn as well.
Please let me know if I need to add something else here