layout admin: add missing calls to update_hash

This commit is contained in:
Alex 2023-11-09 15:42:10 +01:00
parent 03ebf18830
commit bad7cc812e
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE
3 changed files with 4 additions and 2 deletions

View file

@ -240,6 +240,7 @@ pub async fn handle_update_cluster_layout(
.merge(&roles.update_mutator(node, layout::NodeRoleV(new_role))); .merge(&roles.update_mutator(node, layout::NodeRoleV(new_role)));
} }
layout.update_hashes();
garage garage
.system .system
.layout_manager .layout_manager

View file

@ -329,8 +329,9 @@ pub async fn fetch_layout(
pub async fn send_layout( pub async fn send_layout(
rpc_cli: &Endpoint<SystemRpc, ()>, rpc_cli: &Endpoint<SystemRpc, ()>,
rpc_host: NodeID, rpc_host: NodeID,
layout: LayoutHistory, mut layout: LayoutHistory,
) -> Result<(), Error> { ) -> Result<(), Error> {
layout.update_hashes();
rpc_cli rpc_cli
.call( .call(
&rpc_host, &rpc_host,

View file

@ -40,7 +40,7 @@ impl LayoutHistory {
.collect::<HashSet<_>>() .collect::<HashSet<_>>()
} }
pub(crate) fn update_hashes(&mut self) { pub fn update_hashes(&mut self) {
self.trackers_hash = self.calculate_trackers_hash(); self.trackers_hash = self.calculate_trackers_hash();
self.staging_hash = self.calculate_staging_hash(); self.staging_hash = self.calculate_staging_hash();
} }