dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
584 stars 273 forks source link

Understand the difference between Current, Installed and Previous In FirmwareInventory Id #264

Closed axelfauvel closed 10 months ago

axelfauvel commented 10 months ago

Hi there,

I'm working on a project to collect Dell Servers firmwares,

I'm retrieving them using this route /redfish/v1/UpdateService/FirmwareInventory?$expand=*($levels=1), I'm getting all firmwares for this specific server in one call which is exactly what I need.

For some equipments, I have multiple entries, see below :

        {
            "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
            "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Current-100170-18.5.17",
            "@odata.type": "#SoftwareInventory.v1_1_1.SoftwareInventory",
            "Description": "Represents Firmware Inventory",
            "Id": "Current-100170-18.5.17",
            "Name": "Intel(R) Ethernet 10G 4P X520/I350 rNDC - 24:6E:96:8D:4B:90",
            "SoftwareId": "100170",
            "Status": {"Health": "OK", "State": "Enabled"},
            "Updateable": True,
            "Version": "18.5.17",
        },
        {
            "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
            "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Installed-100170-19.5.12",
            "@odata.type": "#SoftwareInventory.v1_1_1.SoftwareInventory",
            "Description": "Represents Firmware Inventory",
            "Id": "Installed-100170-19.5.12",
            "Name": "Intel(R) Ethernet 10G 4P X520/I350 rNDC - 24:6E:96:8D:4B:90",
            "SoftwareId": "100170",
            "Status": {"Health": "OK", "State": "Enabled"},
            "Updateable": True,
            "Version": "19.5.12",
        },
        {
            "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
            "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Previous-100170-18.3.6",
            "@odata.type": "#SoftwareInventory.v1_1_1.SoftwareInventory",
            "Description": "Represents Firmware Inventory",
            "Id": "Previous-100170-18.3.6",
            "Name": "Intel(R) Ethernet 10G 4P X520/I350 rNDC - 24:6E:96:8D:4B:90",
            "SoftwareId": "100170",
            "Status": {"Health": "OK", "State": "Enabled"},
            "Updateable": True,
            "Version": "18.3.6",
        },

I can see that these 3 entries have a different "state" that can be seen in the Id field, which can be Previous, Current and Installed, but I wasn't able to find in Dell documentations what this exactly means.

I need to know which firmware is loaded on each component to know if they are up to date or not.

Could someone help me solve this out ?

Thanks

texroemer commented 10 months ago

Hi @axelfauvel

This behavior is currently not documented but I'll escalate this concern with internal teams at Dell to get this information added.

Here's a description explaining the three different entry types:

Installed: Firmware version currently installed on the device detected by iDRAC.

Current: Firmware version currently installed on the device detected by iDRAC and this version reported should match the Installed entry reported in firmware inventory. But when you see a current entry in firmware inventory for a device, this means iDRAC has a version of this firmware stored and is available for rollback support.

Previous: Firmware version that was previous on the device before you updated to a newer version. This previous version is also stored in iDRAC and is available for rollback support.

For your firmware inventory example i noticed installed and current versions are not matching which shouldn't happen, these should both report the same version. But i noticed the versions you have on the server are over 3 years old, can you flash to 21.5.9, then latest 22.0.9, see if this fixes firmware inventory.

Thanks Tex

axelfauvel commented 10 months ago

Hello @texroemer, thanks for your feedback.

What kind of usecase does Current handle ?

Is it something that can be used for a device firmware upgrade ? Like, you have your current firmware installed, you install a new version, something goes wrong, you perform a rollback using the Current version ?

Thanks

texroemer commented 10 months ago

Example could be your current(installed) backplane firmware gets corrupted and no longer reports any storage devices connected. Since you have a current version stored in iDRAC you can easily perform a rollback which will override the corrupted version on the backplane and get it working properly again and the backplane will still be at the same firmware version.

Another example, say your BIOS is at 1.0 and you update to 2.0, installed and current will be at 2.0 now and previous at 1.0. For some reason your BIOS gets corrupted and your server now RSOD during POST. To get the server working again you can rollback the firmware to either 1.0 or 2.0 since both are available for rollback. Since the server RSOD with 2.0 this could be a known issue and this version is not stable so you would rollback to 1.0 version.

Thanks Tex

axelfauvel commented 10 months ago

Thanks for your explanations, this is crystal clear now 👍