Closed nmasse-itix closed 4 months ago
Hi,
First of all, I would like to thank you for this thorough report, it made debugging easy.
The error message is actually expected as upgrading to "620241WD" requires "620211WD" to be currently active / installed firmware. See dependency list
BUT: The tool should have prompted a selection between "620241WD" and "620361WD" as those are the currently supported versions:
<lista_device model="WD_BLACK SN850X 2000GB">
<url>wdDashboard/firmware/WD_BLACK_SN850X_2000GB/620241WD/device_properties.xml</url>
<url>wdDashboard/firmware/WD_BLACK_SN850X_2000GB/620361WD/device_properties.xml</url>
</lista_device>
For some reason it only detected the first one, thus skipping the selection.
[[2024-04-23 10:18:12]] DEBUG:wd_fw_update.main:Firmware versions: f['620241WD']
I've testes the parser and it works fine by prompting the selection of both versions. Nevertheless I've refactored the code s.t. it fails early and improved the error message.
I would be happy if you could upgrade to the new release v1.2.0 and report if the error persists.
I tested the latest release. Observed a change in the behavior: this time I did not had the choice of the slot nor the choice of the action. I am directly notified with the same error message.
$ sudo -i
# . wd-fw-update/bin/activate
# pip install --upgrade wd-fw-update
[...]
Downloading wd_fw_update-1.2.0-py3-none-any.whl (8.4 kB)
Installing collected packages: wd-fw-update
Attempting uninstall: wd-fw-update
Found existing installation: wd_fw_update 1.1.1
Uninstalling wd_fw_update-1.1.1:
Successfully uninstalled wd_fw_update-1.1.1
Successfully installed wd-fw-update-1.2.0
# wd_fw_update -vv
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Namespace(loglevel=10)
[[2024-04-23 12:48:30]] INFO:wd_fw_update.main:Starting firmware update process.
Western Digital SSD Firmware Update Tool
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Getting device list.
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Only one device found: ['/dev/nvme0n1']
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Getting device properties.
[[2024-04-23 12:48:30]] INFO:wd_fw_update.main:Model name: WD_BLACK SN850X 2000GB
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Getting firmware url.
[[2024-04-23 12:48:30]] DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): wddashboarddownloads.wdc.com:443
[[2024-04-23 12:48:30]] DEBUG:urllib3.connectionpool:https://wddashboarddownloads.wdc.com:443 "GET /wdDashboard/config/devices/lista_devices.xml HTTP/1.1" 200 45945
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Firmware versions: f['620241WD']
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Only one firmware to select, skipping user-promt.
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Firmware properties url: https://wddashboarddownloads.wdc.com/wdDashboard/firmware/WD_BLACK_SN850X_2000GB/620241WD/device_properties.xml
[[2024-04-23 12:48:30]] DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): wddashboarddownloads.wdc.com:443
[[2024-04-23 12:48:30]] DEBUG:urllib3.connectionpool:https://wddashboarddownloads.wdc.com:443 "GET /wdDashboard/firmware/WD_BLACK_SN850X_2000GB/620241WD/device_properties.xml HTTP/1.1" 200 264
[[2024-04-23 12:48:30]] DEBUG:wd_fw_update.main:Firmware dependencies: ['620211WD']
The current firmware version 620361WD is not in the dependency
list of the new firmware. In order to upgrade to 620241WD, please
upgrade to one of these versions first: ['620211WD']
Then everything works as expected. But i need to adapt the error message / userflow to make it clearer.
You are currently on fw version 620361WD
which is together with 620241WD
the currently supported version.
As the function ask_fw_version
filters out the current version (as updating to it would not change anything) 620361WD
is not shown --> the promt is skipped.
(I overlooked that you are already on the newest version in my last message)
Thanks for your quick response and your help !
TODO for me:
Environment
Hardware
Steps to reproduce the problem
Metadata from WD at present time
Observed behavior
Expected behavior
A user friendly message saying that my firmware is already at the latest version available.
Somethink like the previous script that you wrote ?
Thanks for your attention and the time you devote to the community ! 👏