mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-09 14:19:22 +00:00
modifications in several files to :
- have consistent error return types - store the zone redundancy in a Lww - print the error and message in the CLI (TODO: for the server Api, should msg be returned in the body response?)
This commit is contained in:
@@ -162,7 +162,12 @@ pub async fn handle_apply_cluster_layout(
|
||||
let param = parse_json_body::<ApplyRevertLayoutRequest>(req).await?;
|
||||
|
||||
let layout = garage.system.get_cluster_layout();
|
||||
let layout = layout.apply_staged_changes(Some(param.version))?;
|
||||
let (layout, msg) = layout.apply_staged_changes(Some(param.version))?;
|
||||
//TODO : how to display msg ? Should it be in the Body Response ?
|
||||
for s in msg.iter() {
|
||||
println!("{}", s);
|
||||
}
|
||||
|
||||
garage.system.update_cluster_layout(&layout).await?;
|
||||
|
||||
Ok(Response::builder()
|
||||
|
||||
Reference in New Issue
Block a user