aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-27 17:57:48 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-27 17:57:48 +0200
commit247dbcd5980e6a0158fe209d85788d3167dceab0 (patch)
treeb5f9b20cb87ead9d5e8cfb70984f9795ad2e7712 /src/garage/cli
parent0e5175abeeb1b2d9cfe27603005b7feb3cf040de (diff)
downloadgarage-247dbcd5980e6a0158fe209d85788d3167dceab0.tar.gz
garage-247dbcd5980e6a0158fe209d85788d3167dceab0.zip
Only one scrub worker (wip)
Diffstat (limited to 'src/garage/cli')
-rw-r--r--src/garage/cli/structs.rs25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs
index c1ee32ab..bc44b5ef 100644
--- a/src/garage/cli/structs.rs
+++ b/src/garage/cli/structs.rs
@@ -427,8 +427,29 @@ pub enum RepairWhat {
/// Verify integrity of all blocks on disc (extremely slow, i/o intensive)
#[structopt(name = "scrub")]
Scrub {
- /// Tranquility factor (see tranquilizer documentation)
- #[structopt(name = "tranquility", default_value = "2")]
+ #[structopt(subcommand)]
+ cmd: ScrubCmd,
+ },
+}
+
+#[derive(Serialize, Deserialize, StructOpt, Debug, Eq, PartialEq, Clone)]
+pub enum ScrubCmd {
+ /// Start scrub
+ #[structopt(name = "start")]
+ Start,
+ /// Pause scrub (it will resume automatically after 24 hours)
+ #[structopt(name = "pause")]
+ Pause,
+ /// Resume paused scrub
+ #[structopt(name = "resume")]
+ Resume,
+ /// Cancel scrub in progress
+ #[structopt(name = "cancel")]
+ Cancel,
+ /// Set tranquility level for in-progress and future scrubs
+ #[structopt(name = "set-tranquility")]
+ SetTranquility {
+ #[structopt()]
tranquility: u32,
},
}