[pve-devel] [PATCH manager 1/6] include corosync online status in resources api call
Dominik Csapak
d.csapak at proxmox.com
Thu Apr 27 12:17:29 CEST 2017
we already have it here, and we can use it to better display the
status in the tree
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2Tools.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/PVE/API2Tools.pm b/PVE/API2Tools.pm
index 24947753..a92b99b3 100644
--- a/PVE/API2Tools.pm
+++ b/PVE/API2Tools.pm
@@ -48,6 +48,11 @@ sub extract_node_stats {
$entry->{maxdisk} = ($d->[11] || 0) + 0;
}
+ # also extract online status as the pvestatd can fail
+ if ($members && $members->{$node}) {
+ $entry->{online} = $members->{$node}->{online};
+ }
+
return $entry;
}
--
2.11.0
More information about the pve-devel
mailing list