diff options
author | Alex Auvolat <alex@adnab.me> | 2022-11-08 14:23:08 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-11-08 14:58:39 +0100 |
commit | d75b37b018fc0ce8e3832c8531d9556ff7a345c9 (patch) | |
tree | bb458446bd8bc8c098beedbebbd4cbefb7359724 /src/api/admin/cluster.rs | |
parent | 73a4ca8b1515f95bf7860fc292c12db83d3c6228 (diff) | |
download | garage-d75b37b018fc0ce8e3832c8531d9556ff7a345c9.tar.gz garage-d75b37b018fc0ce8e3832c8531d9556ff7a345c9.zip |
Return more info when layout's .check() fails, fix compilation, fix test
Diffstat (limited to 'src/api/admin/cluster.rs')
-rw-r--r-- | src/api/admin/cluster.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index 040778b1..7b91f709 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -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( |