diff options
author | Alex Auvolat <alex@adnab.me> | 2022-11-07 19:34:40 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-11-07 20:11:30 +0100 |
commit | ea5afc251106b3f6e2d07f942ba1f88abeef8765 (patch) | |
tree | fe9679c408cbac8af18bb6400105ebc4a3bd1ad3 /src/api | |
parent | 28d7a49f6365fadaffaa903cc10434c1ed28d564 (diff) | |
download | garage-ea5afc251106b3f6e2d07f942ba1f88abeef8765.tar.gz garage-ea5afc251106b3f6e2d07f942ba1f88abeef8765.zip |
Style improvements
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/admin/cluster.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index 61bfb8c5..040778b1 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -86,7 +86,7 @@ fn get_cluster_layout(garage: &Arc<Garage>) -> GetClusterLayoutResponse { .map(|(k, _, v)| (hex::encode(k), v.0.clone())) .collect(), staged_role_changes: layout - .staging + .staging_roles .items() .iter() .filter(|(k, _, v)| layout.roles.get(k) != Some(v)) @@ -137,14 +137,14 @@ pub async fn handle_update_cluster_layout( let mut layout = garage.system.get_cluster_layout(); let mut roles = layout.roles.clone(); - roles.merge(&layout.staging); + roles.merge(&layout.staging_roles); for (node, role) in updates { let node = hex::decode(node).ok_or_bad_request("Invalid node identifier")?; let node = Uuid::try_from(&node).ok_or_bad_request("Invalid node identifier")?; layout - .staging + .staging_roles .merge(&roles.update_mutator(node, NodeRoleV(role))); } |