bmc code update with automation/redfish

David Wang (王振宇) DavidWang at quantatw.com
Tue Jun 9 20:19:50 AEST 2020


Hi George,

Thank you for the reply,

> 
> 	#(UTC) 2020/05/14 07:25:52.259475 - 0.835874 - Executing:
> patch('/redfish/v1/UpdateService', body="{'HttpPushUriOptions' :
> {'HttpPushUriApplyTime' : {'ApplyT...
> 	#(UTC) 2020/05/14 07:25:52.315118 - 0.055644 - Executing:
> get('/redfish/v1/UpdateService')
> 	apply_time: None
> 	#(UTC) 2020/05/14 07:26:13.643450 - 21.328331 - Issuing: cd
> /tmp/images/; stat -c '%Y %n' * | sort -k1,1nr | head -n 1

I stuck in here, robot can't find anything in /tmp/images.

I've tracked the difference between the steps of Rest and Redfish.
Rest upload the image and wait for another signal to active it,
while Redfish upload the image and active it at the same time.
However robot is using redfish cmd.
See:
 https://github.com/openbmc/docs/blob/master/code-update/code-update.md (step 2&4)
 https://github.com/openbmc/docs/blob/master/designs/firmware-update-over-redfish.md#update-an-image  

Step "active image" will copy 4 image files to /run/initramfs and delete the image folder /tmp/images/c78e674a before returning http response. 
And robot will check image's ID right after getting http response. But there's nothing in /tmp/images anymore, so it fail.
The time sequence is as follows:
1.robot upload tar file by redfish command and BMC untar it in /tmp/images/c78e674a.
2.bmcweb active the image: BMC copy 4 image files to /run/initramfs and delete /tmp/images/c78e674a.
3.robot try to check image's id in /tmp/images/c78e674a but it no longer exists.
4.robot fail.

Based on the above, the robot seems to fail without a doubt.
However the robot works for you.
What makes this different? Do I miss something?
Does anyone have any ideas?
Any advice is welcome.
Thanks.

> 	#(UTC) 2020/05/14 07:26:18.806209 - 0.173404 - Issuing: ls -l
> /tmp/images/d2dea46d/MANIFEST
> 	image_id: d2dea46d
> 	#(UTC) 2020/05/14 07:26:19.447311 - 0.112001 - Issuing: cat
> /tmp/images/d2dea46d/MANIFEST
> 	manifest:
> purpose=xyz.openbmc_project.Software.Version.VersionPurpose.BMC
> 	version=2.8.0-dev-1823-gca64d2910
> 	KeyType=OpenBMC
> 	HashType=RSA-SHA256
> 	MachineName=witherspoon
> 	#(UTC) 2020/05/14 07:26:19.778033 - 0.017176 - Executing:
> get('/redfish/v1/UpdateService/FirmwareInventory/d2dea46d')
> 	status:
> 	[Health]: OK
> 	[HealthRollup]: OK
> 	[State]: Updating
> 

Best regards,
David


More information about the openbmc mailing list