Skip to content

feat: reflect effective failure domain in StorageNode and StorageNode… - #385

Merged
geoffrey1330 merged 6 commits into
mainfrom
add_failure_domain_status
Jul 31, 2026
Merged

feat: reflect effective failure domain in StorageNode and StorageNode…#385
geoffrey1330 merged 6 commits into
mainfrom
add_failure_domain_status

Conversation

@geoffrey1330

@geoffrey1330 geoffrey1330 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

…Set status

Fixes: issue-386

Add failure domain to StorageNode and StorageNodeSet status

Reflects the failure domain of each storage node into the CR status fields,
making it observable withou t inspecting the spec or the backend directly.

Changes

  • Added failureDomain field to StorageNodeStatus and NodeStatus (in StorageNodeSet.status.nodes[])
  • Added FD print column to StorageNode (kubectl get sn -o wide)
  • Added failure_domain to SNODEAPIResponse — sourced directly from the backend API (StorageNodeDTO.failure_domain)
  • New fdPtr() helper converts the API integer to *int32 (nil when 0/unset)
  • syncStatus and pollUUIDFromBackend set status.failureDomain from the API response on every status patch
  • syncUUIDFromNodeSet carries the value forward from StorageNodeSet.status.nodes[]
  • Both NodeStatus{} constructions in the SNS controller (onAllSocketNodesOnline and syncTrackedNodesStatus) populate failureDomain from the API response

Result

user@users-MacBook-Pro-2 ~ % kubectl -n simplyblock get storagenodes -o wide
NAME                      WORKER                          SOCKET   NODEIDX   FD    UUID                                   STATUS   HEALTH   AGE
simplyblock-node-8uod4f   vm03.simplyblock3.localdomain   0        0         2     f234f9fe-32b1-420e-9c09-3beb5672390d   online   true     2m55s
simplyblock-node-j9zzzt   vm02.simplyblock3.localdomain   0        0         1     37d338ed-d269-4597-9cdd-2d475e2f6cb9   online   true     5m13s
simplyblock-node-wudohq   vm04.simplyblock3.localdomain   0        0         3     18e037da-4bfe-417a-bb0c-8ba1832f2b0b   online   true     85s

Comment thread operator/internal/controller/simplyblockstoragenodeset_controller.go Outdated
Comment thread helm-charts/charts/simplyblock-operator/templates/webhook.yaml Outdated
@geoffrey1330
geoffrey1330 merged commit 43a58fa into main Jul 31, 2026
16 checks passed
@geoffrey1330
geoffrey1330 deleted the add_failure_domain_status branch July 31, 2026 18:42
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.

feat: reflect effective failure domain in StorageNode and StorageNodeSet status

3 participants