|
Post by pescobar on Feb 18, 2021 12:47:12 GMT
Hi, I am trying to use redfish to update the bios settings in this machine www.gigabyte.com/Enterprise/GPU-Server/G242-Z11-rev-100#ovThe redfish version in the machine is 1.7.0 $> curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -X GET https://${BMCIP}/redfish/v1/ | jq '.RedfishVersion' "1.7.0"
This url works fine to query the current bios settings $> curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -X GET https://${BMCIP}/redfish/v1/Systems/Self/Bios
But I cannot find the url which allows to update the bios settings: $> curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -X GET https://${BMCIP}/redfish/v1/Systems/Self/Bios | jq . | grep -i setting "@Redfish.Settings": { "@odata.type": "#Settings.v1_2_0.Settings", "MessageId": "Base.1.0.SettingsFailed" "Description": "Current BIOS Settings", "Name": "Current BIOS Settings"
If I try a similar query in a different machine with redfish version 1.1.0 I can find the url to update the BIOS settings $> curl -s -k -u $USER:$PASSWORD https://${BMCIP}/redfish/v1/ | jq '.RedfishVersion' "1.1.0"
$> curl -s -k -u $USER:$PASSWORD https://${BMCIP}/redfish/v1/Systems/N-18.11.101/Bios | jq . | grep -i settings "Name": "BIOS Configuration Current Settings", "@Redfish.Settings": { "@odata.type": "#Settings.v1_1_0.Settings", "SettingsObject": { "@odata.id": "/redfish/v1/Systems/N-18.11.101/Bios/Settings"
in the system with redfish 1.1.0 I can use url "/redfish/v1/Systems/N-18.11.101/Bios/Settings" to update the bios settings but in the system running redfish 1.7.0 I cannot find any url which would allow me to update the bios settings. Am I doing something wrong it's just that this system doesn't allow to update the bios setting using redfish? thanks in advance for any help or advice.
|
|
|
Post by jautor on Feb 18, 2021 17:08:11 GMT
I don't see anything you're doing wrong. Since that implementation at least has the "Settings" annotation I assume that means that they support setting BIOS settings via Redfish. But as there's an error message of "SettingsFailed" it seems like an issue with the service, you'll have to ask the vendor about that. I'm guessing that the other machine you tested is from a different vendor (or at least a different BMC firmware vendor) because the "Self" URI segment vs "N-18.11.101" is a different style.
But as most vendors will follow the "Settings" pattern, you might just blindly try "https://${BMCIP}/redfish/v1/Systems/Self/Bios/Settings" and see if that works. Do a GET first and see if there's a payload there. It may be that with an error condition it's not fully populating the Bios resource for the Settings resource.
Jeff
|
|
|
Post by pescobar on Feb 18, 2021 20:28:57 GMT
I don't see anything you're doing wrong. Since that implementation at least has the "Settings" annotation I assume that means that they support setting BIOS settings via Redfish. But as there's an error message of "SettingsFailed" it seems like an issue with the service, you'll have to ask the vendor about that. I'm guessing that the other machine you tested is from a different vendor (or at least a different BMC firmware vendor) because the "Self" URI segment vs "N-18.11.101" is a different style. You are right. The other machine where I can update the bios settings is from a different vendor. It's this intel motherboard with intel cpus But as most vendors will follow the "Settings" pattern, you might just blindly try "https://${BMCIP}/redfish/v1/Systems/Self/Bios/Settings" and see if that works. Do a GET first and see if there's a payload there. It may be that with an error condition it's not fully populating the Bios resource for the Settings resource. I had already tried that but it didn't worked I didn't mention it in my previous post to don't make it too long $> curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -X GET https://${BMCIP}/redfish/v1/Systems/Self/Bios/Settings | jq . { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_0_7.Message", "Message": "The resource at the URI /redfish/v1/Systems/Self/Bios/Settings was not found.", "MessageArgs": [ "/redfish/v1/Systems/Self/Bios/Settings" ], "MessageId": "Base.1.5.ResourceMissingAtURI", "Resolution": "Place a valid resource at the URI or correct the URI and resubmit the request.", "Severity": "Critical" } ], "code": "Base.1.5.ResourceMissingAtURI", "message": "The resource at the URI /redfish/v1/Systems/Self/Bios/Settings was not found." } }
In the intel motherboard which works I can find the url grepping for "data.id" but in the gigabyte motherboard I cannot find anything matching with "data.id" This is the Intel motherboard: $ curl -s -k -u $USER:$PASSWORD https://${BMCIP}/redfish/v1/Systems/N-18.11.101/Bios |jq . |grep data.id "@odata.id": "/redfish/v1/Systems/N-18.11.101/Bios", "@odata.id": "/redfish/v1/Systems/N-18.11.101/Bios/Settings"
And this is the gigabyte motherboard: $ curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -X GET https://${BMCIP}/redfish/v1/Systems/Self/Bios|jq . |grep data.id "@odata.id": "/redfish/v1/Systems/Self/Bios",
If nobody suggest another alternative I will try to contact the vendor.
|
|
|
Post by mraineri on Feb 19, 2021 13:40:00 GMT
It's possible the Gigabyte system is expecting you to PATCH the Bios resource directly. This is a bit counter-intuitive since BIOS changes really don't get applied until the next system reset, which is why we model the "future state" in the Settings resource. You could try PATCH directly on "https://${BMCIP}/redfish/v1/Systems/Self/Bios", but it's worth alerting the vendor to this discrepancy from others. One other thing worth trying is checking how our BIOS settings tool handles these systems. We have a project in GitHub with an assortment of utilities, one of which is named "rf_bios_settings.py". You can find more info about the project here: github.com/DMTF/Redfish-Tacklebox
|
|
|
Post by pescobar on Feb 19, 2021 14:41:46 GMT
It's possible the Gigabyte system is expecting you to PATCH the Bios resource directly. This is a bit counter-intuitive since BIOS changes really don't get applied until the next system reset, which is why we model the "future state" in the Settings resource. You could try PATCH directly on "https://${BMCIP}/redfish/v1/Systems/Self/Bios", but it's worth alerting the vendor to this discrepancy from others. Thanks for the suggestion. I hadn't thought about this possibility but I just tried and it didn't work $> curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" --data '{"Rome0179": "Performance"}' -X PATCH https://${BMCIP}/redfish/v1/Systems/Self/Bios | jq . { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_0_7.Message", "Message": "The method PATCH is not allowed for the URI /redfish/v1/Systems/Self/Bios", "MessageArgs": [ "PATCH", "/redfish/v1/Systems/Self/Bios" ], "MessageId": "HttpStatus.1.0.MethodNotAllowed", "Resolution": "Use a method listed in the Allow header", "Severity": "Critical" } ], "code": "HttpStatus.1.0.MethodNotAllowed", "message": "The method PATCH is not allowed for the URI /redfish/v1/Systems/Self/Bios" } }
One other thing worth trying is checking how our BIOS settings tool handles these systems. We have a project in GitHub with an assortment of utilities, one of which is named "rf_bios_settings.py". You can find more info about the project here: github.com/DMTF/Redfish-Tackleboxthanks for the pointer. I will check the project. I will update the post in case I find any solution or workaround.
|
|
|
Post by pescobar on Feb 19, 2021 16:26:57 GMT
I did a quick test with github.com/DMTF/Redfish-TackleboxUtilities "rf_sensor_list.py" and "rf_sys_inventory.py" work in both the intel and gigabyte motherboards but utility "rf_bios_settings.py" only works in the intel motherboard and crashes in the gigabyte. e.g. this works fine with intel to query the current bios settings $> rf_bios_settings.py --user $USER --password $PASSWORD --rhost https://$BMCIP but I get this error with gigabyte board when I query the bios settings: $> $ rf_bios_settings.py --user $USER --password $PASSWORD --rhost https://$BMCIP Traceback (most recent call last): File "~/.venvs/redfish_utilities/bin/rf_bios_settings.py", line 33, in <module> current_settings, future_settings = redfish_utilities.get_system_bios( redfish_obj, args.system ) File "~/.venvs/redfish_utilities/lib/python3.6/site-packages/redfish_utilities/systems.py", line 239, in get_system_bios bios_settings = context.get( bios.dict["@Redfish.Settings"]["SettingsObject"]["@odata.id"] ) KeyError: 'SettingsObject'
Checking the code the crash happens here github.com/DMTF/Redfish-Tacklebox/blob/master/redfish_utilities/systems.py#L237-L240 # Get the Settings object if present if "@Redfish.Settings" in bios.dict: bios_settings = context.get( bios.dict["@Redfish.Settings"]["SettingsObject"]["@odata.id"] ) future_settings = bios_settings.dict["Attributes"]
If I check the output I receive from the API, in the intel board I can find the "SettingsObject" $> curl -s -k -u $USER:$PASSWORD https://${BMCIP}/redfish/v1/Systems/S-18.11.218/Bios |jq . |grep -A5 @Redfish.Settings "@Redfish.Settings": { "@odata.type": "#Settings.v1_1_0.Settings", "SettingsObject": { "@odata.id": "/redfish/v1/Systems/S-18.11.218/Bios/Settings" } }
but in the gigabyte board I don't get the "SettingsObject" and I get "MessageId": "Base.1.0.SettingsFailed" $ curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -X GET https://${BMCIP}/redfish/v1/Systems/Self/Bios|jq . |grep -A10 @Redfish.Settings "@Redfish.Settings": { "@odata.type": "#Settings.v1_2_0.Settings", "ETag": "Dummyetag", "Messages": [ { "MessageId": "Base.1.0.SettingsFailed" } ] }, "@odata.context": "/redfish/v1/$metadata#Bios.Bios", "@odata.etag": "W/\"1608542498\"",
so my guess is that for some reason the implementation in the gigabyte board differs or it has an issue and that's why it triggers the message ""MessageId": "Base.1.0.SettingsFailed" I am trying to contact the vendor to check if they can help
|
|
|
Post by pescobar on Feb 23, 2021 17:24:11 GMT
After contacting the vendor they told me that I can update the BIOS settings using PATCH in url "/redfish/v1/Systems/Self/Bios/SD". The url doesn't work when using GET. Only works with PATCH. e.g. this works for me
$> curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -H'If-None-Match: "123456"' --data '{ "Attributes": { "Rome0179":"Performance" }}' -X PATCH https://${BMCIP}/redfish/v1/Systems/Self/Bios/SD After applying the BIOS settings you get a 204 and you have to reboot the machine so the new BIOS settings apply.
Another useful URL to find out the docs for all the available BIOS settings is this one:
$> curl -s -k -u $USER:$PASSWORD -H"Content-type: application/json" -X GET https://${BMCIP}/redfish/v1/Registries/BiosAttributeRegistry.json | jq .
|
|
|
Post by jautor on Feb 24, 2021 0:55:08 GMT
After contacting the vendor they told me that I can update the BIOS settings using PATCH in url "/redfish/v1/Systems/Self/Bios/SD". The url doesn't work when using GET. Only works with PATCH. e.g. this works for me Well, glad you got it to work, but that implementation is incorrect. The Settings resource should absolutely respond to a GET request. And yes, it's expected a reboot is needed to get BIOS settings to be be applied - this is exactly why the "settings" concept was included in Redfish. Jeff
|
|