Skip to content

HDDS-14188. Include DN states that do not accept writes in NodesOutOfSpace metric#9518

Merged
adoroszlai merged 2 commits intoapache:masterfrom
sarvekshayr:HDDS-14188
Dec 19, 2025
Merged

HDDS-14188. Include DN states that do not accept writes in NodesOutOfSpace metric#9518
adoroszlai merged 2 commits intoapache:masterfrom
sarvekshayr:HDDS-14188

Conversation

@sarvekshayr
Copy link
Copy Markdown
Contributor

@sarvekshayr sarvekshayr commented Dec 17, 2025

What changes were proposed in this pull request?

SCM metric NodesOutOfSpace only considers DN space availability. We should include DNs that are not in NodeState#HEALTHY and NodeOperationalState#IN_SERVICE states as non-writable too. Renamed the metric to NonWritableNodes.

What is the link to the Apache JIRA

HDDS-14188

How was this patch tested?

CI: https://github.com/sarvekshayr/ozone/actions/runs/20300694429
Before

    "InServiceHealthyNodes" : 5,
    "EnteringMaintenanceStaleNodes" : 0,
    "EnteringMaintenanceHealthyReadonlyNodes" : 0,
    "EnteringMaintenanceHealthyNodes" : 0,
    "EnteringMaintenanceDeadNodes" : 0,
    "AllNodes" : 5,
    "NonWritableNodes" : 0,

After putting a node in maintenance mode

    "InServiceHealthyNodes" : 4,
    "EnteringMaintenanceStaleNodes" : 0,
    "EnteringMaintenanceHealthyReadonlyNodes" : 0,
    "EnteringMaintenanceHealthyNodes" : 1,
    "EnteringMaintenanceDeadNodes" : 0,
    "AllNodes" : 5,
    "NonWritableNodes" : 1,

@rich7420
Copy link
Copy Markdown
Contributor

thanks for the patch!

Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @sarvekshayr for the patch.

@adoroszlai
Copy link
Copy Markdown
Contributor

nit: I think NodesOutOfSpace may need to be renamed to reflect the change. Or maybe have a separate metric for non-writable nodes?

@sarvekshayr
Copy link
Copy Markdown
Contributor Author

nit: I think NodesOutOfSpace may need to be renamed to reflect the change. Or maybe have a separate metric for non-writable nodes?

We need ONE metric that considers both space and state of the nodes. I was thinking about renaming it to ReadableNodes or NonWritableNodes. What do you suggest?

@adoroszlai
Copy link
Copy Markdown
Contributor

NonWritableNodes seems OK.

@adoroszlai adoroszlai merged commit cfcfc39 into apache:master Dec 19, 2025
43 checks passed
@adoroszlai
Copy link
Copy Markdown
Contributor

Thanks @sarvekshayr for the patch, @rich7420 for the review.

echonesis pushed a commit to echonesis/ozone that referenced this pull request Dec 24, 2025
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