|
Post by jkugler on Aug 2, 2022 20:27:36 GMT
I am trying to execute a firmware update on a Dell server. I'm using github.com/xlab-steampunk/redfish-client-python and calling root.UpdateService.execute_action( "#UpdateService.SimpleUpdate", dict(ImageURI=image_uri) )
The error I get back from the BMC is this: InstanceID value provided for the update operation is invalid Enumerate inventory, copy the InstanceID value and provide that value for the update operation. I'm obviously not passing in an InstanceID. And I'm not sure where it's coming from. Anybody hit this error before? Do you have a solution? This seems to be a Dell-specific error, and googling only turns up Dell resources that tell me what I already know...and nothing else. 
|
|
|
Post by mraineri on Aug 3, 2022 14:18:59 GMT
I haven't worked with that particular client before, but at least from the little searching I did, it seems like you're doing everything right. Supposedly it will send the following in the POST request to the SimpleUpdate action in UpdateService:
{ "ImageURI": "<your update URI>" }
Just to confirm, does the URI you're providing start with "http://", "https://", or some other well-known scheme?
Would it be possible to provide the firmware version reported by the manager?
|
|
|
Post by jkugler on Aug 3, 2022 18:12:47 GMT
Yes, I believe the post request is correct, and the scheme on the URL is http or https. I might need to do some debugging to make sure. If the URL was invalid, I would assume an error regarding that. The "InstanceID" error has me stumped. I don't remember the firmware version off the top of my head; I'll have to dig that out.
|
|
|
Post by mraineri on Aug 3, 2022 18:38:08 GMT
Yeah, I'm looking it up too and I can't make sense of it either. My best guess is there may be a bug in the firmware version you're currently running that returning that error unexpectedly. I've tried the SimpleUpdate action on some Dell systems I have available to me and I'm not hitting that error, but I also have my systems up to date with the latest firmware. I'll do more digging too.
|
|
|
Post by jkugler on Aug 3, 2022 22:21:05 GMT
So, the iDRAC9 version that I'm working against is 4.32.10.00. This is the full error { "error": { "@Message.ExtendedInfo": [ { "Message": "InstanceID value provided for the update operation is invalid", "MessageArgs": [], "MessageArgs@odata.count": 0, "MessageId": "IDRAC.2.2.SUP024", "RelatedProperties": [], "RelatedProperties@odata.count": 0, "Resolution": "Enumerate inventory, copy the InstanceID value and provide that value for the update operation.", "Severity": "Warning" } ], "code": "Base.1.5.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information" } }
This is an attempted BIOS update; works without issue in the iDRAC9 5.x firmware. 
|
|
|
Post by mraineri on Aug 4, 2022 19:52:52 GMT
Definitely looks like a bug if the binary you're referencing in the ImageURI parameter is a valid BIOS image for the system.
Just to confirm, you no longer see the error after you updated to 5.x? If so, that's good they made a fix for it already. Is it worth tracking down when the fix was introduced?
|
|
|
Post by jkugler on Aug 4, 2022 20:06:28 GMT
Correct, the bug goes away if upgraded to 5. But...that still creates a lot of pain, because I can't upgrade the BMC via Redfish (same error about InstanceID). I'm going to have to create a hacky call-out to racadm to upgrade the firmware. 
|
|
|
Post by mraineri on Aug 4, 2022 20:28:27 GMT
Certainly a good step in the right direction that it's working now, but I understand your frustration. Would an easier workaround for you be with a Redfish method (perhaps additional parameters you need to specify with the SimpleUpdate request just for Dell systems with older firmware)? I can't guarantee something like that exists beyond what you've done with racadm, but I can check around on my end for alternatives.
|
|
|
Post by jkugler on Aug 4, 2022 21:34:44 GMT
Possibly...but I don't even know what the InstanceID is supposed to be! 
|
|
|
Post by mraineri on Aug 5, 2022 13:53:43 GMT
I've downgraded one of my systems to run 4.32.10.00 and I'm able to use SimpleUpdate without any additional parameters. I know the firmware images can come in various flavors, and I used the EXE format from the Dell website (maybe older versions were more picky about the file itself and returned that "InstanceID" error).
Here's the sequence I did with curl (with some things redacted).
>> curl -u <USERNAME>:<PASSWORD> -D - -H "Content-Type: application/json" -k -X POST https://<BMCIP>/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate -d '{"ImageURI": "http://<FILESHAREIP>/BIOS_8JY6W_WN64_2.14.2.EXE"}' HTTP/1.1 202 Accepted Date: Fri, 05 Aug 2022 18:23:19 GMT Server: Apache OData-Version: 4.0 Access-Control-Allow-Origin: * Cache-Control: no-cache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Location: /redfish/v1/TaskService/Tasks/JID_597237998356 Content-Length: 0 Content-Type: application/json;odata.metadata=minimal;charset=utf-8
>> curl -u <USERNAME>:<PASSWORD> -D - -k https://<BMCIP>/redfish/v1/TaskService/Tasks/JID_597237998356 HTTP/1.1 202 Accepted Date: Fri, 05 Aug 2022 18:23:40 GMT Server: Apache Link: </redfish/v1/Schemas/Task.v1_4_2.json>;rel=describedby OData-Version: 4.0 Access-Control-Allow-Origin: * Cache-Control: no-cache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 880 Content-Type: application/json;odata.metadata=minimal;charset=utf-8
{"@odata.context":"/redfish/v1/$metadata#Task.Task","@odata.id":"/redfish/v1/TaskService/Tasks/JID_597237998356","@odata.type":"#Task.v1_4_2.Task","Description":"Server Configuration and other Tasks running on iDRAC are listed here","Id":"JID_597237998356","Messages":[{"Message":"Package successfully downloaded.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"RED002"}],"Messages@odata.count":1,"Name":"Firmware Update: BIOS","Oem":{"Dell":{"@odata.type":"#DellJob.v1_0_4.DellJob","CompletionTime":null,"Description":"Job Instance","EndTime":null,"Id":"JID_597237998356","JobState":"Running","JobType":"FirmwareUpdate","Message":"Package successfully downloaded.","MessageArgs":[],"MessageId":"RED002","Name":"Firmware Update: BIOS","PercentComplete":0,"StartTime":"TIME_NOW","TargetSettingsURI":null}},"PercentComplete":null,"TaskState":"Running","TaskStatus":"OK"}
>> curl -u <USERNAME>:<PASSWORD> -H "Content-Type: application/json" -D - -k -X POST https://<BMCIP>/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset -d '{"ResetType": "ForceRestart"}' HTTP/1.1 204 No Content Date: Fri, 05 Aug 2022 18:24:06 GMT Server: Apache OData-EntityId: /redfish/v1/Systems/System.Embedded.1 X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
>> curl -u <USERNAME>:<PASSWORD> -D - -k https://<BMCIP>/redfish/v1/TaskService/Tasks/JID_597237998356 HTTP/1.1 202 Accepted Date: Fri, 05 Aug 2022 18:24:15 GMT Server: Apache Link: </redfish/v1/Schemas/Task.v1_4_2.json>;rel=describedby OData-Version: 4.0 Access-Control-Allow-Origin: * Cache-Control: no-cache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 877 Content-Type: application/json;odata.metadata=minimal;charset=utf-8
{"@odata.context":"/redfish/v1/$metadata#Task.Task","@odata.id":"/redfish/v1/TaskService/Tasks/JID_597237998356","@odata.type":"#Task.v1_4_2.Task","Description":"Server Configuration and other Tasks running on iDRAC are listed here","Id":"JID_597237998356","Messages":[{"Message":"Task successfully scheduled.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"JCP001"}],"Messages@odata.count":1,"Name":"Firmware Update: BIOS","Oem":{"Dell":{"@odata.type":"#DellJob.v1_0_4.DellJob","CompletionTime":null,"Description":"Job Instance","EndTime":"TIME_NA","Id":"JID_597237998356","JobState":"Scheduled","JobType":"FirmwareUpdate","Message":"Task successfully scheduled.","MessageArgs":[],"MessageId":"JCP001","Name":"Firmware Update: BIOS","PercentComplete":0,"StartTime":"TIME_NOW","TargetSettingsURI":null}},"PercentComplete":0,"TaskState":"Starting","TaskStatus":"OK"}
>> curl -u <USERNAME>:<PASSWORD> -D - -k https://<BMCIP>/redfish/v1/TaskService/Tasks/JID_597237998356 HTTP/1.1 202 Accepted Date: Fri, 05 Aug 2022 18:24:29 GMT Server: Apache Link: </redfish/v1/Schemas/Task.v1_4_2.json>;rel=describedby OData-Version: 4.0 Access-Control-Allow-Origin: * Cache-Control: no-cache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 877 Content-Type: application/json;odata.metadata=minimal;charset=utf-8
{"@odata.context":"/redfish/v1/$metadata#Task.Task","@odata.id":"/redfish/v1/TaskService/Tasks/JID_597237998356","@odata.type":"#Task.v1_4_2.Task","Description":"Server Configuration and other Tasks running on iDRAC are listed here","Id":"JID_597237998356","Messages":[{"Message":"Task successfully scheduled.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"JCP001"}],"Messages@odata.count":1,"Name":"Firmware Update: BIOS","Oem":{"Dell":{"@odata.type":"#DellJob.v1_0_4.DellJob","CompletionTime":null,"Description":"Job Instance","EndTime":"TIME_NA","Id":"JID_597237998356","JobState":"Scheduled","JobType":"FirmwareUpdate","Message":"Task successfully scheduled.","MessageArgs":[],"MessageId":"JCP001","Name":"Firmware Update: BIOS","PercentComplete":0,"StartTime":"TIME_NOW","TargetSettingsURI":null}},"PercentComplete":0,"TaskState":"Starting","TaskStatus":"OK"}
>> curl -u <USERNAME>:<PASSWORD> -D - -k https://<BMCIP>/redfish/v1/TaskService/Tasks/JID_597237998356 HTTP/1.1 202 Accepted Date: Fri, 05 Aug 2022 18:25:33 GMT Server: Apache Link: </redfish/v1/Schemas/Task.v1_4_2.json>;rel=describedby OData-Version: 4.0 Access-Control-Allow-Origin: * Cache-Control: no-cache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 882 Content-Type: application/json;odata.metadata=minimal;charset=utf-8
{"@odata.context":"/redfish/v1/$metadata#Task.Task","@odata.id":"/redfish/v1/TaskService/Tasks/JID_597237998356","@odata.type":"#Task.v1_4_2.Task","Description":"Server Configuration and other Tasks running on iDRAC are listed here","Id":"JID_597237998356","Messages":[{"Message":"The specified job is in progress.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"PR20"}],"Messages@odata.count":1,"Name":"Firmware Update: BIOS","Oem":{"Dell":{"@odata.type":"#DellJob.v1_0_4.DellJob","CompletionTime":null,"Description":"Job Instance","EndTime":"TIME_NA","Id":"JID_597237998356","JobState":"Running","JobType":"FirmwareUpdate","Message":"The specified job is in progress.","MessageArgs":[],"MessageId":"PR20","Name":"Firmware Update: BIOS","PercentComplete":10,"StartTime":"TIME_NOW","TargetSettingsURI":null}},"PercentComplete":10,"TaskState":"Running","TaskStatus":"OK"}
>> curl -u <USERNAME>:<PASSWORD> -D - -k https://<BMCIP>/redfish/v1/TaskService/Tasks/JID_597237998356 HTTP/1.1 200 OK Date: Fri, 05 Aug 2022 18:33:21 GMT Server: Apache Link: </redfish/v1/Schemas/Task.v1_4_2.json>;rel=describedby OData-Version: 4.0 Access-Control-Allow-Origin: * Cache-Control: no-cache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 967 Content-Type: application/json;odata.metadata=minimal;charset=utf-8
{"@odata.context":"/redfish/v1/$metadata#Task.Task","@odata.id":"/redfish/v1/TaskService/Tasks/JID_597237998356","@odata.type":"#Task.v1_4_2.Task","Description":"Server Configuration and other Tasks running on iDRAC are listed here","EndTime":"2022-08-05T13:33:09-05:00","Id":"JID_597237998356","Messages":[{"Message":"The specified job has completed successfully.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"PR19"}],"Messages@odata.count":1,"Name":"Firmware Update: BIOS","Oem":{"Dell":{"@odata.type":"#DellJob.v1_0_4.DellJob","CompletionTime":"2022-08-05T13:33:09","Description":"Job Instance","EndTime":"TIME_NA","Id":"JID_597237998356","JobState":"Completed","JobType":"FirmwareUpdate","Message":"The specified job has completed successfully.","MessageArgs":[],"MessageId":"PR19","Name":"Firmware Update: BIOS","PercentComplete":100,"StartTime":"TIME_NOW","TargetSettingsURI":null}},"PercentComplete":100,"TaskState":"Completed","TaskStatus":"OK"}
|
|
|
Post by jkugler on Aug 5, 2022 17:38:37 GMT
Well...that's even more frustrating, then. As far as I know, the Python library is issuing a post to https://<BMCIP>/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate. I don't know why I'm getting back the error about InstanceID. Siiiiigh. And yes, it's the exact same version you used (4.32.10.00). What model is your server? I was getting this error on an R440 and R740xd.
|
|
|
Post by mraineri on Aug 5, 2022 18:15:41 GMT
I was using an R640.
Were you also using the .EXE image files, or did you unpack it before sending it?
|
|
|
Post by jkugler on Aug 5, 2022 18:34:28 GMT
I used the EXE file.
|
|
|
Post by jkugler on Aug 8, 2022 20:20:05 GMT
mraineriWanted to give a huge thanks! The BMC and BIOS updates work fine using Python Requests library, and directly posting to the redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate URI. Not going to try to debug why at the moment, just going to bypass the library I'm using and go with a "raw" Requests POST. Thanks again! j
|
|
|
Post by jkugler on Aug 8, 2022 20:40:10 GMT
So, you're going to love this. The code I was dealing with (which called root.UpdateService.execute_action) for some reason stripped the "http://" from the front of the firmware download URL. Why? No idea, I don't have access to the original devs to ask that question.
|
|