storcon_cli: add tenant-drop

This commit is contained in:
John Spray
2024-04-23 19:36:57 +01:00
parent ee9ec26808
commit c8379f0128

View File

@@ -126,6 +126,12 @@ enum Command {
#[arg(long)]
tenant_id: TenantId,
},
/// Uncleanly drop a tenant from the storage controller: this doesn't delete anything from pageservers. Appropriate
/// if you e.g. used `tenant-warmup` by mistake on a tenant ID that doesn't really exist, or is in some other region.
TenantDrop {
#[arg(long)]
tenant_id: TenantId,
},
}
#[derive(Parser)]
@@ -675,6 +681,15 @@ async fn main() -> anyhow::Result<()> {
}
}
}
Command::TenantDrop { tenant_id } => {
storcon_client
.dispatch::<(), ()>(
Method::POST,
format!("debug/v1/tenant/{tenant_id}/drop"),
None,
)
.await?;
}
}
Ok(())