Skip to content

HDDS-15764. [Recon] Show error card for unavailable datanode in Cluster Capacity - #10767

Merged
priyeshkaratha merged 2 commits into
apache:masterfrom
priyeshkaratha:HDDS-15764
Jul 23, 2026
Merged

HDDS-15764. [Recon] Show error card for unavailable datanode in Cluster Capacity#10767
priyeshkaratha merged 2 commits into
apache:masterfrom
priyeshkaratha:HDDS-15764

Conversation

@priyeshkaratha

@priyeshkaratha priyeshkaratha commented Jul 14, 2026

Copy link
Copy Markdown
Member

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 === -1 sentinel — the card still rendered used / remaining / committed values 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
image

@priyeshkaratha
priyeshkaratha marked this pull request as ready for review July 15, 2026 02:11

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @priyeshkaratha LGTM. Tested locally as well.

@devmadhuu
devmadhuu self-requested a review July 22, 2026 14:56

@devmadhuu devmadhuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@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.

@priyeshkaratha priyeshkaratha changed the title HDDS-15853. [Recon] Show error card for unavailable datanode in Cluster Capacity HDDS-15764. [Recon] Show error card for unavailable datanode in Cluster Capacity Jul 22, 2026
@priyeshkaratha

Copy link
Copy Markdown
Member Author

@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.

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.

@priyeshkaratha
priyeshkaratha requested review from devmadhuu and removed request for spacemonkd July 23, 2026 04:41

@devmadhuu devmadhuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @priyeshkaratha for improving the patch. LGTM +1

@priyeshkaratha
priyeshkaratha merged commit bb1da7f into apache:master Jul 23, 2026
39 checks passed
@priyeshkaratha

Copy link
Copy Markdown
Member Author

Thanks @devmadhuu and @chihsuan for reviewing the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants