snapshot: handle legacy longhorn fields
This commit is contained in:
parent
2ac95c2154
commit
c5c976e556
@ -772,6 +772,15 @@ def _append_longhorn(lines: list[str], summary: dict[str, Any]) -> None:
|
||||
by_state = longhorn.get("by_state") if isinstance(longhorn.get("by_state"), dict) else {}
|
||||
by_robust = longhorn.get("by_robustness") if isinstance(longhorn.get("by_robustness"), dict) else {}
|
||||
if total is not None:
|
||||
if attached is None and detached is None and degraded is None:
|
||||
unhealthy = longhorn.get("unhealthy_count")
|
||||
lines.append(
|
||||
"longhorn: total={total}, unhealthy={unhealthy}".format(
|
||||
total=total,
|
||||
unhealthy=unhealthy if unhealthy is not None else 0,
|
||||
)
|
||||
)
|
||||
else:
|
||||
lines.append(
|
||||
"longhorn: total={total}, attached={attached}, detached={detached}, degraded={degraded}".format(
|
||||
total=total,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user