HDDS-15764. [Recon] Show error card for unavailable datanode in Cluster Capacity - #10767
Conversation
chihsuan
left a comment
There was a problem hiding this comment.
Thanks @priyeshkaratha LGTM. Tested locally as well.
devmadhuu
left a comment
There was a problem hiding this comment.
@priyeshkaratha , changes largely LGTM, just a point worth noting that, it is always better to point the default to the first available DN and only fall back to the error card when every DN is unavailable, else user always lands on an error card on first load and must manually switch — even though a healthy DN exists.
371fac1 to
b44807d
Compare
Thanks @devmadhuu. This make sense. I have updated PR which will do auto switch and if all of the DNs are down it will show error card. |
devmadhuu
left a comment
There was a problem hiding this comment.
Thanks @priyeshkaratha for improving the patch. LGTM +1
|
Thanks @devmadhuu and @chihsuan for reviewing the patch. |
What changes were proposed in this pull request?
On the Recon Cluster Capacity page, the datanode detail card seeds its default selection to the first datanode in the filtered list, regardless of whether that DN is reachable. When the default-selected DN is unavailable — its pending-deletion query failed, signalled by the
pendingBlockSize === -1sentinel — the card still renderedused/remaining/committedvalues from the storage report. For an offline or unreachable DN these values can be stale, so the UI silently displayed outdated capacity data. The node-selector dropdown already disables such DNs (disabledOpts), but the default seeding (hostNames[0]) can still land on one.Now it will show error card when all DNs are down, otherwise if we selected DN which is not available it will auto switch to one of the available DN
Note : Code is generated using AI
What is the link to the Apache JIRA
HDDS-15764
How was this patch tested?
Tested manually and updated unit test case
