Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add firmware_update phase support for HPE servers #181

Closed
wants to merge 8 commits into from

Conversation

nancyc12
Copy link
Contributor

@nancyc12 nancyc12 commented Dec 29, 2023

Description

Based on CR033 - Firmware updates for regression testing, add firmware_update support for HPE servers utilising ilorest (apt install from HPE repository) and the firmware files downloaded from HPE firmware repository.

Since the firmware repository index files (fwrepo.json) on HPE firmware repository are not having complete list of devices supported by each file (presenting in "target" field, which should be a list instead of single target ID), a temporary implementation is hosting our own customised index files in the codebase until HPE update their index files in the repository. Once the files being updated in the repository, we can remove the local index files, and refer to remote index file in the run time.

Resolved issues

N/A

Documentation

The documentation is already in https://github.com/canonical/testflinger/blob/main/docs/reference/test-phases.rst

Tests

  • add unit test for HPE.py
  • validate the code change didn't impact the functionality for PC device
  • run the agent in Server Lab environment
************************************************************

* Starting testflinger firmware_update phase on doubletusk *

************************************************************
2023-12-29 12:58:16,017 doubletusk INFO: DEVICE CONNECTOR: BEGIN firmware_update
2023-12-29 12:58:17,007 doubletusk INFO: DEVICE CONNECTOR: 10.245.130.29 is a HPE HPEDevice
2023-12-29 12:58:33,802 doubletusk INFO: DEVICE CONNECTOR: successfully installed RESTful Interface Tool 4.2.0.0
2023-12-29 12:58:42,429 doubletusk INFO: DEVICE CONNECTOR: HPE server model: fwpp-gen10
2023-12-29 12:58:42,446 doubletusk INFO: DEVICE CONNECTOR: firmware on HPE machine:
[{'Firmware Name': 'System ROM', 'Firmware Version': 'U30 v2.76 (02/09/2023)', 'Location': 'System Board', 'Fwpkg Available': {'2023.09.00.00': {'file': 'U30_2.90_07_20_2023.fwpkg', 'description': 'ROM Flash Firmware Package - HPE ProLiant DL380 Gen10 (U30) Servers', 'deviceclass': 'aa148d2e-6e09-453e-bc6f-63baa5f5ccc4', 'version': '2.90_07-20-2023', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000000205']}, '2023.03.00.00': {'file': 'U30_2.76_02_09_2023.fwpkg', 'description': 'ROM Flash Firmware Package - HPE ProLiant DL380 Gen10 (U30) Servers', 'deviceclass': 'aa148d2e-6e09-453e-bc6f-63baa5f5ccc4', 'version': '2.76_02-09-2023', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000000205']}, '2022.09.1': {'file': 'U30_2.68_07_14_2022.fwpkg', 'description': 'ROM Flash Firmware Package - HPE ProLiant DL380 Gen10 (U30) Servers', 'deviceclass': 'aa148d2e-6e09-453e-bc6f-63baa5f5ccc4', 'version': '2.68_07-14-2022', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000000205']}, '2022.03.1': {'file': 'U30_2.62_03_08_2022.fwpkg', 'description': 'ROM Flash Firmware Package - HPE ProLiant DL380 Gen10 (U30) Servers', 'deviceclass': 'aa148d2e-6e09-453e-bc6f-63baa5f5ccc4', 'version': '2.62_03-08-2022', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000000205']}}, 'Update Order': 0}, {'Firmware Name': 'Redundant System ROM', 'Firmware Version': 'U30 v2.90 (07/20/2023)', 'Location': 'System Board', 'Fwpkg Available': {}, 'Update Order': 0}, {'Firmware Name': 'Server Platform Services (SPS) Firmware', 'Firmware Version': '4.1.4.901', 'Location': 'System Board', 'Fwpkg Available': {'2023.09.00.00': {'file': 'SPSGen10_04.01.05.002.fwpkg', 'description': 'ROM Flash Firmware Package - Server Platform Services (SPS) Firmware for HPE Gen10 Servers', 'deviceclass': 'b34e5677-21dc-45d3-872b-42f76fee9053', 'version': '04.01.05.002', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-3c10-86800a000101']}, '2023.03.00.00': {'file': 'SPSGen10_04.01.04.901.fwpkg', 'description': 'ROM Flash Firmware Package - Server Platform Services (SPS) Firmware for HPE Gen10 Servers', 'deviceclass': 'b34e5677-21dc-45d3-872b-42f76fee9053', 'version': '04.01.04.901', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-3c10-86800a000101']}, '2022.09.1': {'file': 'SPSGen10_04.01.04.804.fwpkg', 'description': 'ROM Flash Firmware Package - Server Platform Services (SPS) Firmware for HPE Gen10 Servers', 'deviceclass': 'b34e5677-21dc-45d3-872b-42f76fee9053', 'version': '04.01.04.804', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-3c10-86800a000101']}, '2022.03.1': {'file': 'SPSGen10_04.01.04.601.fwpkg', 'description': 'ROM Flash Firmware Package - Server Platform Services (SPS) Firmware for HPE Gen10 Servers', 'deviceclass': 'b34e5677-21dc-45d3-872b-42f76fee9053', 'version': '04.01.04.601', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-3c10-86800a000101']}}, 'Update Order': 1}, {'Firmware Name': 'Server Platform Services (SPS) Descriptor', 'Firmware Version': '1.2 0', 'Location': 'System Board', 'Fwpkg Available': {}, 'Update Order': 1}, {'Firmware Name': 'Innovation Engine (IE) Firmware', 'Firmware Version': '0.2.3.0', 'Location': 'System Board', 'Fwpkg Available': {'2023.09.00.00': {'file': 'IEGen10_0.2.3.0.fwpkg', 'description': 'ROM Flash Firmware Package - HPE Gen10 Innovation Engine Firmware for HPE Gen10 Servers', 'deviceclass': 'c734e171-8721-48c9-9ed6-d5bc7da5ef8d', 'version': '0.2.3.0', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target
2023-12-29 12:58:42,446 doubletusk INFO: DEVICE CONNECTOR: ': ['a6b1a447-382a-5a4f-3c10-3c100a000303']}, '2023.03.00.00': {'file': 'IEGen10_0.2.3.0.fwpkg', 'description': 'ROM Flash Firmware Package - HPE Gen10 Innovation Engine Firmware for HPE Gen10 Servers', 'deviceclass': 'c734e171-8721-48c9-9ed6-d5bc7da5ef8d', 'version': '0.2.3.0', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-3c10-3c100a000303']}, '2022.09.1': {'file': 'IEGen10_0.2.3.0.fwpkg', 'description': 'ROM Flash Firmware Package - HPE Gen10 Innovation Engine Firmware for HPE Gen10 Servers', 'deviceclass': 'c734e171-8721-48c9-9ed6-d5bc7da5ef8d', 'version': '0.2.3.0', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-3c10-3c100a000303']}, '2022.03.1': {'file': 'IEGen10_0.2.3.0.fwpkg', 'description': 'ROM Flash Firmware Package - HPE Gen10 Innovation Engine Firmware for HPE Gen10 Servers', 'deviceclass': 'c734e171-8721-48c9-9ed6-d5bc7da5ef8d', 'version': '0.2.3.0', 'minimum_active_version': 'null', 'updatableBy': ['Uefi'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-3c10-3c100a000303']}}, 'Update Order': 2}, {'Firmware Name': 'iLO 5', 'Firmware Version': '2.81 Mar 07 2023', 'Location': 'System Board', 'Fwpkg Available': {'2023.09.00.00': {'file': 'ilo5_296.fwpkg', 'description': 'Online ROM Flash Firmware Package - HPE Integrated Lights-Out 5', 'deviceclass': '2f317b9d-c9e3-4d76-bff6-b9d0d085a952', 'version': '2.96', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'no', 'target': ['c5b14abd-6d2f-41d7-b665-0447dfdac3a7', 'c0bcf2b9-1141-49af-aab8-c73791f0349c']}, '2023.03.00.00': {'file': 'ilo5_281.fwpkg', 'description': 'Online ROM Flash Firmware Package - HPE Integrated Lights-Out 5', 'deviceclass': '2f317b9d-c9e3-4d76-bff6-b9d0d085a952', 'version': '2.81', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'no', 'target': ['c5b14abd-6d2f-41d7-b665-0447dfdac3a7', 'c0bcf2b9-1141-49af-aab8-c73791f0349c']}, '2022.09.1': {'file': 'ilo5_272.fwpkg', 'description': 'Online ROM Flash Firmware Package - HPE Integrated Lights-Out 5', 'deviceclass': '2f317b9d-c9e3-4d76-bff6-b9d0d085a952', 'version': '2.72', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'no', 'target': ['c0bcf2b9-1141-49af-aab8-c73791f0349c']}, '2022.03.1': {'file': 'ilo5_271.fwpkg', 'description': 'Online ROM Flash Firmware Package - HPE Integrated Lights-Out 5', 'deviceclass': '2f317b9d-c9e3-4d76-bff6-b9d0d085a952', 'version': '2.71', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'no', 'target': ['c0bcf2b9-1141-49af-aab8-c73791f0349c']}}, 'Update Order': 3}, {'Firmware Name': 'Intelligent Platform Abstraction Data', 'Firmware Version': '16.5.0 Build 53', 'Location': 'System Board', 'Fwpkg Available': {}, 'Update Order': 4}, {'Firmware Name': 'System Programmable Logic Device', 'Firmware Version': '0x31', 'Location': 'System Board', 'Fwpkg Available': {}, 'Update Order': 4}, {'Firmware Name': 'Power Management Controller Firmware', 'Firmware Version': '1.0.8', 'Location': 'System Board', 'Fwpkg Available': {'2023.09.00.00': {'file': 'PICGen10-1.1.0-1.fwpkg', 'description': 'ROM Flash Firmware Package - Advanced Power Capping Microcontroller Firmware for HPE Gen10 and Gen10 Plus Servers', 'deviceclass': '9e48a28a-586c-4519-8405-a04f84e27f0f', 'version': '1.1.0', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000504d05']}, '2023.03.00.00': {'file': 'PICGen10-1.0.8-1.fwpkg', 'description': 'ROM Flash Firmware Package - Advanced Power Capping Microcontroller Firmware for HPE Gen10 and Gen10 Plus Servers', 'deviceclass': '9e48a28a-586c-4519-8405-a04f84e27f0f', 'version': '1.0.8', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000504d05']}, '2022.09.1': {'file': 'PICGen10-1.0.8-1.fwpkg', 'description': 'ROM Flash Firmware Package - Advanced Power Capping Micr
2023-12-29 12:58:42,447 doubletusk INFO: DEVICE CONNECTOR: ocontroller Firmware for HPE Gen10 and Gen10 Plus Servers', 'deviceclass': '9e48a28a-586c-4519-8405-a04f84e27f0f', 'version': '1.0.8', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000504d05']}, '2022.03.1': {'file': 'PICGen10-1.0.8-1.fwpkg', 'description': 'ROM Flash Firmware Package - Advanced Power Capping Microcontroller Firmware for HPE Gen10 and Gen10 Plus Servers', 'deviceclass': '9e48a28a-586c-4519-8405-a04f84e27f0f', 'version': '1.0.8', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000000504d05']}}, 'Update Order': 4}, {'Firmware Name': 'NVMe Backplane Firmware', 'Firmware Version': '1.24', 'Location': 'System Board', 'Fwpkg Available': {'2023.09.00.00': {'file': 'ISS_NVMe_BP_PIC_flashV1B24.fwpkg', 'description': 'Firmware Package - Gen10 NVMe Backplane PIC Firmware', 'deviceclass': '3653aa90-7089-453a-899c-792827a50d67', 'version': '1.24', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000049535320', '00000000-0000-0000-0000-00004e564d65']}, '2023.03.00.00': {'file': 'ISS_NVMe_BP_PIC_flashV1B24.fwpkg', 'description': 'Firmware Package - Gen10 NVMe Backplane PIC Firmware', 'deviceclass': '3653aa90-7089-453a-899c-792827a50d67', 'version': '1.24', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000049535320', '00000000-0000-0000-0000-00004e564d65']}, '2022.09.1': {'file': 'ISS_NVMe_BP_PIC_flashV1B24.fwpkg', 'description': 'Firmware Package - Gen10 NVMe Backplane PIC Firmware', 'deviceclass': '3653aa90-7089-453a-899c-792827a50d67', 'version': '1.24', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['00000000-0000-0000-0000-000049535320', '00000000-0000-0000-0000-00004e564d65']}, '2022.03.1': {'file': 'ISS_NVMe_BP_PIC_flashV1B24.fwpkg', 'description': 'Firmware Package - Gen10 NVMe Backplane PIC Firmware', 'deviceclass': '3653aa90-7089-453a-899c-792827a50d67', 'version': '1.24', 'minimum_active_version': 'null', 'updatableBy': ['Bmc'], 'reboot_required': 'no', 'target': ['00000000-0000-0000-0000-000049535320', '00000000-0000-0000-0000-00004e564d65']}}, 'Update Order': 4}, {'Firmware Name': 'Power Supply Firmware', 'Firmware Version': '2.00', 'Location': 'Bay 1', 'Fwpkg Available': {}, 'Update Order': 4}, {'Firmware Name': 'Power Supply Firmware', 'Firmware Version': '2.00', 'Location': 'Bay 2', 'Fwpkg Available': {}, 'Update Order': 4}, {'Firmware Name': 'Intelligent Provisioning', 'Firmware Version': '3.50.100', 'Location': 'System Board', 'Fwpkg Available': {}, 'Update Order': 4}, {'Firmware Name': 'Power Management Controller FW Bootloader', 'Firmware Version': '1.1', 'Location': 'System Board', 'Fwpkg Available': {}, 'Update Order': 4}, {'Firmware Name': 'HPE Smart Array E208i-a SR Gen10', 'Firmware Version': '5.61', 'Location': 'Embedded RAID', 'Fwpkg Available': {'2023.09.00.00': {'file': 'HPE_SR_Gen10_6.22_A.fwpkg', 'description': 'Firmware Package  - HPE Smart Array P408i-p, P408e-p, P408i-a, P408i-c, E208i-p, E208e-p, E208i-c, E208i-a, P408e-m, P204i-c, P416ie-m and P816i-a SR Gen10 and Gen11 controllers', 'deviceclass': '79f0c163-0c13-4662-9dea-09235fef90cb', 'version': '6.22', 'minimum_active_version': '5.61', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-9005-028f103c1100', 'a6b1a447-382a-5a4f-9005-028f103c1101', 'a6b1a447-382a-5a4f-9005-028f103c0601', 'a6b1a447-382a-5a4f-9005-028f103c0602', 'a6b1a447-382a-5a4f-9005-028f103c0603', 'a6b1a447-382a-5a4f-9005-028f103c0600', 'a6b1a447-382a-5a4f-9005-028f103c0700', 'a6b1a447-382a-5a4f-9005-028f103c0651', 'a6b1a447-382a-5a4f-9005-028f103c0654', 'a6b1a447-382a-5a4f-9005-028f103c0652', 'a6b1a447-382a-5a4f-9005-028f103c0650', 'a6b1a447-382a-5a4f-9005-028f15900382', 'a6b1a447-382a-5a4f-9005-028f15900383']}, '2023.03.00.00': {'file': 'HPE_SR_Gen10_5.61_C.fwpkg', 'description': 'Firmware Package  
2023-12-29 12:58:42,468 doubletusk INFO: DEVICE CONNECTOR: - HPE Smart Array P408i-p, P408e-p, P408i-a, P408i-c, E208i-p, E208e-p, E208i-c, E208i-a, P408e-m, P204i-c and P816i-a SR Gen10 and Gen11 controllers', 'deviceclass': '79f0c163-0c13-4662-9dea-09235fef90cb', 'version': '5.61', 'minimum_active_version': '5.32', 'updatableBy': ['Bmc'], 'reboot_required': 'yes', 'target': ['a6b1a447-382a-5a4f-9005-028f103c1100', 'a6b1a447-382a-5a4f-9005-028f103c1101', 'a6b1a447-382a-5a4f-9005-028f103c0601', 'a6b1a447-382a-5a4f-9005-028f103c0602', 'a6b1a447-382a-5a4f-9005-028f103c0603', 'a6b1a447-382a-5a4f-9005-028f103c0600', 'a6b1a447-382a-5a4f-9005-028f103c0700', 'a6b1a447-382a-5a4f-9005-028f103c0651', 'a6b1a447-382a-5a4f-9005-028f103c0654', 'a6b1a447-382a-5a4f-9005-028f103c0652', 'a6b1a447-382a-5a4f-9005-028f103c0650']}}, 'Update Order': 4}, {'Firmware Name': 'HPE 2SFF NVMe/SAS/uFF Backplane', 'Firmware Version': '1.24', 'Location': 'Box=1', 'Fwpkg Available': {}, 'Update Order': 4}, {'Firmware Name': 'HPE Eth 10/25Gb 2p 640FLR-SFP28 Adptr', 'Firmware Version': '14.32.1010', 'Location': 'Embedded ALOM', 'Fwpkg Available': {}, 'Update Order': 5}, {'Firmware Name': 'NVIDIA Tesla T4', 'Firmware Version': '90.04.96.00.01', 'Location': 'PCI-E Slot 2', 'Fwpkg Available': {}, 'Update Order': 5}, {'Firmware Name': 'NVIDIA Tesla T4', 'Firmware Version': '90.04.96.00.01', 'Location': 'PCI-E Slot 3', 'Fwpkg Available': {}, 'Update Order': 5}, {'Firmware Name': 'NVIDIA Tesla T4', 'Firmware Version': '90.04.96.00.01', 'Location': 'PCI-E Slot 5', 'Fwpkg Available': {}, 'Update Order': 5}, {'Firmware Name': 'NVIDIA Tesla T4', 'Firmware Version': '90.04.96.00.01', 'Location': 'PCI-E Slot 6', 'Fwpkg Available': {}, 'Update Order': 5}, {'Firmware Name': 'Embedded Video Controller', 'Firmware Version': '2.5', 'Location': 'Embedded Device', 'Fwpkg Available': {}, 'Update Order': 5}, {'Firmware Name': 'NVMe Drive', 'Firmware Version': 'EDA5302Q', 'Location': 'NVMe Drive Port 5B Box 1 Bay 1', 'Fwpkg Available': {}, 'Update Order': 5}, {'Firmware Name': 'NVMe Drive', 'Firmware Version': 'EDA5302Q', 'Location': 'NVMe Drive Port 5B Box 1 Bay 2', 'Fwpkg Available': {}, 'Update Order': 5}]
2023-12-29 12:58:42,469 doubletusk INFO: DEVICE CONNECTOR: start flashing all firmware with files in SPP 2023.09.00.00
2023-12-29 12:58:42,470 doubletusk INFO: DEVICE CONNECTOR: [System ROM] update current firmware U30 v2.76 (02/09/2023) to 2.90_07-20-2023
2023-12-29 12:58:42,471 doubletusk INFO: DEVICE CONNECTOR: U30_2.90_07_20_2023.fwpkg is already downloaded
2023-12-29 12:58:42,471 doubletusk INFO: DEVICE CONNECTOR: [Server Platform Services (SPS) Firmware] update current firmware 4.1.4.901 to 04.01.05.002
2023-12-29 12:58:42,471 doubletusk INFO: DEVICE CONNECTOR: SPSGen10_04.01.05.002.fwpkg is already downloaded
2023-12-29 12:58:42,471 doubletusk INFO: DEVICE CONNECTOR: [Innovation Engine (IE) Firmware] no update is needed, already 0.2.3.0
2023-12-29 12:58:42,471 doubletusk INFO: DEVICE CONNECTOR: [iLO 5] update current firmware 2.81 Mar 07 2023 to 2.96
2023-12-29 12:58:42,471 doubletusk INFO: DEVICE CONNECTOR: ilo5_296.fwpkg is already downloaded
2023-12-29 12:58:42,471 doubletusk INFO: DEVICE CONNECTOR: [Power Management Controller Firmware] update current firmware 1.0.8 to 1.1.0
2023-12-29 12:58:42,472 doubletusk INFO: DEVICE CONNECTOR: PICGen10-1.1.0-1.fwpkg is already downloaded
2023-12-29 12:58:42,472 doubletusk INFO: DEVICE CONNECTOR: [NVMe Backplane Firmware] no update is needed, already 1.24
2023-12-29 12:58:42,472 doubletusk INFO: DEVICE CONNECTOR: [HPE Smart Array E208i-a SR Gen10] update current firmware 5.61 to 6.22
2023-12-29 12:58:42,472 doubletusk INFO: DEVICE CONNECTOR: HPE_SR_Gen10_6.22_A.fwpkg is already downloaded
2023-12-29 12:58:42,472 doubletusk INFO: DEVICE CONNECTOR: check and clear iLO taskqueue
2023-12-29 12:59:01,872 doubletusk INFO: DEVICE CONNECTOR: start flashing U30_2.90_07_20_2023.fwpkg
2023-12-29 12:59:40,440 doubletusk INFO: DEVICE CONNECTOR: Uploading firmware: U30_2.90_07_20_2023.fwpkg
Successfully checked 'U30_2.90_07_20_2023.fwpkg'.
Uploading component U30_2.90_07_20_2023.fwpkg.
[200] The operation completed successfully.
Component U30_2.90_07_20_2023.fwpkg uploaded successfully.
Waiting for iLO UpdateService to finish processing the component
00 hour(s) 01 minute(s) 34 second(s) 
Firmware has successfully been flashed and a reboot is required for this firmware to take effect.
2023-12-29 12:59:43,502 doubletusk INFO: DEVICE CONNECTOR: start flashing SPSGen10_04.01.05.002.fwpkg
2023-12-29 13:00:18,028 doubletusk INFO: DEVICE CONNECTOR: Uploading firmware: SPSGen10_04.01.05.002.fwpkg
Successfully checked 'SPSGen10_04.01.05.002.fwpkg'.
Uploading component SPSGen10_04.01.05.002.fwpkg.
[200] The operation completed successfully.
Component SPSGen10_04.01.05.002.fwpkg uploaded successfully.
Waiting for iLO UpdateService to finish processing the component
00 hour(s) 00 minute(s) 24 second(s) 
Creating task: "Update-400484 b'ROM Flash Firmware Package - Server Platform Services (SPS) ...'"
The operation completed successfully.
This firmware is set to flash on reboot.
2023-12-29 13:00:22,197 doubletusk INFO: DEVICE CONNECTOR: start flashing ilo5_296.fwpkg
2023-12-29 13:03:57,358 doubletusk INFO: DEVICE CONNECTOR: Uploading firmware: ilo5_296.fwpkg
Successfully checked 'ilo5_296.fwpkg'.
Uploading component ilo5_296.fwpkg.
[200] The operation completed successfully.
Component ilo5_296.fwpkg uploaded successfully.
Waiting for iLO UpdateService to finish processing the component
00 hour(s) 03 minute(s) 27 second(s) 
Firmware has successfully been flashed.
iLO will reboot to complete flashing. Session will be terminated.
2023-12-29 13:03:57,358 doubletusk INFO: DEVICE CONNECTOR: wait until iLO complete reboot
2023-12-29 13:04:55,046 doubletusk INFO: DEVICE CONNECTOR: start flashing PICGen10-1.1.0-1.fwpkg
2023-12-29 13:06:32,137 doubletusk INFO: DEVICE CONNECTOR: Uploading firmware: PICGen10-1.1.0-1.fwpkg
Successfully checked 'PICGen10-1.1.0-1.fwpkg'.
Uploading component PICGen10-1.1.0-1.fwpkg.
[200] The operation completed successfully.
Component PICGen10-1.1.0-1.fwpkg uploaded successfully.
Waiting for iLO UpdateService to finish processing the component
00 hour(s) 01 minute(s) 15 second(s) 
Firmware has successfully been flashed.
2023-12-29 13:06:34,590 doubletusk INFO: DEVICE CONNECTOR: start flashing HPE_SR_Gen10_6.22_A.fwpkg
2023-12-29 13:08:22,597 doubletusk INFO: DEVICE CONNECTOR: Uploading firmware: HPE_SR_Gen10_6.22_A.fwpkg
Successfully checked 'HPE_SR_Gen10_6.22_A.fwpkg'.
Uploading component HPE_SR_Gen10_6.22_A.fwpkg.
[200] The operation completed successfully.
Component HPE_SR_Gen10_6.22_A.fwpkg uploaded successfully.
Waiting for iLO UpdateService to finish processing the component
00 hour(s) 02 minute(s) 43 second(s) 
Firmware has successfully been flashed and a reboot is required for this firmware to take effect.
2023-12-29 13:08:22,598 doubletusk INFO: DEVICE CONNECTOR: reboot DUT
2023-12-29 13:18:46,080 doubletusk INFO: DEVICE CONNECTOR: HPE machine reaches FinishedPost after 600s
2023-12-29 13:18:46,080 doubletusk INFO: DEVICE CONNECTOR: check and wait for 1800s until 10.245.130.29 is SSHable
2023-12-29 13:20:59,363 doubletusk INFO: DEVICE CONNECTOR: 10.245.130.29 is SSHable after 133s
2023-12-29 13:21:04,838 doubletusk INFO: DEVICE CONNECTOR: [System ROM] firmware flashed U30 v2.76 (02/09/2023) → U30 v2.90 (07/20/2023)
2023-12-29 13:21:04,838 doubletusk INFO: DEVICE CONNECTOR: [Server Platform Services (SPS) Firmware] firmware flashed 4.1.4.901 → 4.1.5.2
2023-12-29 13:21:04,839 doubletusk INFO: DEVICE CONNECTOR: [iLO 5] firmware flashed 2.81 Mar 07 2023 → 2.96 Aug 17 2023
2023-12-29 13:21:04,839 doubletusk INFO: DEVICE CONNECTOR: [Power Management Controller Firmware] firmware flashed 1.0.8 → 1.1.0
2023-12-29 13:21:04,839 doubletusk INFO: DEVICE CONNECTOR: [HPE Smart Array E208i-a SR Gen10] firmware flashed 5.61 → 6.22
2023-12-29 13:21:05,904 doubletusk INFO: DEVICE CONNECTOR: END firmware_update

@nancyc12 nancyc12 marked this pull request as ready for review January 3, 2024 08:41
Copy link
Collaborator

@plars plars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I just spotted this, I think it was proposed while I was out on vacation and I missed it until now. I see a lot of very large json files getting added, which seem to only contain hp specific data. Also, they are date stamped so I'm guessing they'll need to be updated periodically? But I don't see any documentation about where they came from or how to update them, and I'm guessing they aren't from us.

Ideally, would it be possible to import these from somewhere only when needed? it would be nice to not have to land them all here and keep them updated in our source tree if we can avoid it.

@nancyc12
Copy link
Contributor Author

nancyc12 commented Feb 2, 2024

@plars I don't think we want to maintain these json files either. I explained the situation in description (quoted below). I'm expecting HPE to update their json files on their firmware repository so that we can use them directly whenever we need (they promise to do that after the new year). Once they're ready, I would update the json files fetching script. It would be apprecitated if you can take a look of other parts first. :)

Since the firmware repository index files (fwrepo.json) on HPE firmware repository are not having complete list of devices supported by each file (presenting in "target" field, which should be a list instead of single target ID), a temporary implementation is hosting our own customised index files in the codebase until HPE update their index files in the repository. Once the files being updated in the repository, we can remove the local index files, and refer to remote index file in the run time.

Copy link
Collaborator

@plars plars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw that you had updated this, and I definitely need to spend some more time looking at it but it may take some time because it's quite large. I wanted to get a few comments/questions in quickly though...

  1. see comment below about logmsg()
  2. is this the new json files? https://downloads.linux.hpe.com/SDR/repo/fwpp-gen10/next/fwrepodata/fwrepo.json
  3. you mentioned a script to download these from the source... I don't see that here though. My general concern is that this hosts a LOT of data from external sources, but I don't see anything in documentation about where it came from, etc. And I wonder if we should be hosting it at all rather than pulling it from the original source.

f"SPP {spp} is not available in HPE FW repository."
" Please check if it's a valid SPP."
)
logmsg(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a WIP branch that removes logmsg(). I would definitely recommend replacing all new calls you have here to logmsg to just do the normal logger.{loglevel}(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed logmsg().

Copy link
Contributor

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your changes, just few small comments here

bmc_password: str,
):
super().__init__(ipaddr, user)
self.bmc_ip = bmc_ip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be any validation of the IP address?


def run_cmd(
self, cmds: str, raise_stderr: bool = True, timeout: int = 30
) -> Tuple[int, str, str]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you’re using Python >=3.9, there is no need to use Tuple from typing library, you can just use tuple instead. Here are some examples in the doc: https://docs.python.org/3/library/typing.html#type-aliases

Comment on lines +52 to +55
logger.info(
"check and wait for %ds until %s is SSHable"
% (timeout, self.ipaddr)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can pass variables to log as function arguments, and this is used even in the documentation

Suggested change
logger.info(
"check and wait for %ds until %s is SSHable"
% (timeout, self.ipaddr)
)
logger.info(
"check and wait for %ds until %s is SSHable",
timeout, self.ipaddr
)

@nancyc12
Copy link
Contributor Author

move the changes to #255

@nancyc12 nancyc12 closed this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants