Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/client/pydaos/raw/daos_cref.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP
(C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
"""
Expand Down Expand Up @@ -53,7 +53,8 @@ class RebuildStatus(ctypes.Structure):
("rs_errno", ctypes.c_uint32),
("rs_state", ctypes.c_uint32),
("rs_max_supported_layout_ver", ctypes.c_uint16),
("rs_padding16", ctypes.c_uint16),
("rs_flags", ctypes.c_uint8),
("rs_reserved_", ctypes.c_uint8),
("rs_fail_rank", ctypes.c_uint32),
("rs_toberb_obj_nr", ctypes.c_uint64),
("rs_obj_nr", ctypes.c_uint64),
Expand Down
7 changes: 6 additions & 1 deletion src/control/cmd/daos/pretty/pool.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// (C) Copyright 2020-2024 Intel Corporation.
// (C) Copyright 2025 Hewlett Packard Enterprise Development LP
// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
// (C) Copyright 2025 Google LLC
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
Expand Down Expand Up @@ -138,6 +138,11 @@ func PrintPoolInfo(pi *daos.PoolInfo, out io.Writer) error {
} else {
fmt.Fprintf(w, "- Rebuild failed, status=%d\n", pi.Rebuild.Status)
}
if pi.Rebuild.Degraded {
fmt.Fprintln(w, "- Data redundancy: degraded")
} else {
fmt.Fprintln(w, "- Data redundancy: normal")
}
} else {
fmt.Fprintln(w, "- No rebuild status available.")
}
Expand Down
60 changes: 37 additions & 23 deletions src/control/cmd/daos/pretty/pool_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// (C) Copyright 2020-2024 Intel Corporation.
// (C) Copyright 2025 Hewlett Packard Enterprise Development LP
// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand Down Expand Up @@ -50,9 +50,10 @@ Pool health info:
PoolLayoutVer: 1,
UpgradeLayoutVer: 2,
Rebuild: &daos.PoolRebuildStatus{
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
Degraded: true,
},
TierStats: []*daos.StorageUsageStats{
{
Expand All @@ -72,6 +73,7 @@ Pool %s, ntarget=2, disabled=1, leader=42, version=100, state=TargetsExcluded
Pool layout out of date (1 < 2) -- see `+backtickStr+` for details.
Pool health info:
- Rebuild busy, 42 objs, 21 recs
- Data redundancy: degraded
Pool space info:
- Target count:1
- Storage tier 0 (SCM):
Expand All @@ -96,9 +98,10 @@ Pool space info:
UpgradeLayoutVer: 2,
EnabledRanks: ranklist.MustCreateRankSet("[0,1,2]"),
Rebuild: &daos.PoolRebuildStatus{
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
Degraded: true,
},
TierStats: []*daos.StorageUsageStats{
{
Expand All @@ -119,6 +122,7 @@ Pool layout out of date (1 < 2) -- see `+backtickStr+` for details.
Pool health info:
- Enabled ranks: 0-2
- Rebuild busy, 42 objs, 21 recs
- Data redundancy: degraded
Pool space info:
- Target count:1
- Storage tier 0 (SCM):
Expand All @@ -144,9 +148,10 @@ Pool space info:
DisabledRanks: ranklist.MustCreateRankSet("[0,1,3]"),
DeadRanks: ranklist.MustCreateRankSet("[2]"),
Rebuild: &daos.PoolRebuildStatus{
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
Degraded: true,
},
TierStats: []*daos.StorageUsageStats{
{
Expand All @@ -166,6 +171,7 @@ Pool health info:
- Disabled ranks: 0-1,3
- Dead ranks: 2
- Rebuild busy, 42 objs, 21 recs
- Data redundancy: degraded
`, poolUUID.String()),
},
"normal response; disabled ranks": {
Expand All @@ -182,9 +188,10 @@ Pool health info:
UpgradeLayoutVer: 2,
DisabledRanks: ranklist.MustCreateRankSet("[0,1,3]"),
Rebuild: &daos.PoolRebuildStatus{
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
Degraded: true,
},
TierStats: []*daos.StorageUsageStats{
{
Expand All @@ -205,6 +212,7 @@ Pool layout out of date (1 < 2) -- see `+backtickStr+` for details.
Pool health info:
- Disabled ranks: 0-1,3
- Rebuild busy, 42 objs, 21 recs
- Data redundancy: degraded
Pool space info:
- Target count:1
- Storage tier 0 (SCM):
Expand All @@ -229,9 +237,10 @@ Pool space info:
UpgradeLayoutVer: 2,
DisabledRanks: ranklist.MustCreateRankSet("[0,1,3]"),
Rebuild: &daos.PoolRebuildStatus{
State: 42,
Objects: 42,
Records: 21,
State: 42,
Objects: 42,
Records: 21,
Degraded: false,
},
TierStats: []*daos.StorageUsageStats{
{
Expand All @@ -252,6 +261,7 @@ Pool layout out of date (1 < 2) -- see `+backtickStr+` for details.
Pool health info:
- Disabled ranks: 0-1,3
- Rebuild unknown, 42 objs, 21 recs
- Data redundancy: normal
Pool space info:
- Target count:1
- Storage tier 0 (SCM):
Expand All @@ -275,10 +285,11 @@ Pool space info:
PoolLayoutVer: 1,
UpgradeLayoutVer: 2,
Rebuild: &daos.PoolRebuildStatus{
Status: 2,
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
Status: 2,
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
Degraded: true,
},
TierStats: []*daos.StorageUsageStats{
{
Expand All @@ -299,6 +310,7 @@ Pool %s, ntarget=2, disabled=1, leader=42, version=100, state=TargetsExcluded
Pool layout out of date (1 < 2) -- see `+backtickStr+` for details.
Pool health info:
- Rebuild failed, status=2
- Data redundancy: degraded
Pool space info:
- Target count:1
- Storage tier 0 (SCM):
Expand All @@ -322,9 +334,10 @@ Pool space info:
PoolLayoutVer: 1,
UpgradeLayoutVer: 2,
Rebuild: &daos.PoolRebuildStatus{
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
State: daos.PoolRebuildStateBusy,
Objects: 42,
Records: 21,
Degraded: true,
},
TierStats: []*daos.StorageUsageStats{
{
Expand All @@ -346,6 +359,7 @@ Pool %s, ntarget=2, disabled=1, leader=42, version=100, state=TargetsExcluded
Pool layout out of date (1 < 2) -- see `+backtickStr+` for details.
Pool health info:
- Rebuild busy, 42 objs, 21 recs
- Data redundancy: degraded
Pool space info:
- Target count:1
- Total memory-file size: 1.1 GB
Expand Down
Loading
Loading