mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-08 05:43:13 +00:00
Return more info when layout's .check() fails, fix compilation, fix test
This commit is contained in:
@@ -163,16 +163,13 @@ pub async fn handle_apply_cluster_layout(
|
||||
|
||||
let layout = garage.system.get_cluster_layout();
|
||||
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()
|
||||
.status(StatusCode::NO_CONTENT)
|
||||
.body(Body::empty())?)
|
||||
.header(http::header::CONTENT_TYPE, "text/plain")
|
||||
.body(Body::from(msg.join("\n")))?)
|
||||
}
|
||||
|
||||
pub async fn handle_revert_cluster_layout(
|
||||
|
||||
Reference in New Issue
Block a user