From 25c196f34d958f4f61d50c89a1c5d40b96d7cd24 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 27 Mar 2024 13:55:49 +0100 Subject: [next-0.10] admin api: fix logic in get cluster status --- src/api/admin/cluster.rs | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index e5877fcd..357ac600 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -70,9 +70,7 @@ pub async fn handle_get_cluster_status(garage: &Arc) -> Result { - if n.role.is_none() { - n.role = Some(role); - } + n.role = Some(role); } } } @@ -81,15 +79,21 @@ pub async fn handle_get_cluster_status(garage: &Arc) -> Result