remove the old snapshot store; tombstone its options
This commit is contained in:
parent
de3c5cbb65
commit
20d286f06a
1 changed files with 97 additions and 1308 deletions
|
|
@ -41,9 +41,6 @@ pub(crate) async fn dispatch_subvol(socket: &Path, name: &str, cmd: SubvolCmd) -
|
|||
parent,
|
||||
dest,
|
||||
} => subvol_snapshot_send(socket, name, &label, parent.as_deref(), &dest).await,
|
||||
SnapshotCmd::Push { label, parent } => {
|
||||
subvol_snapshot_push(socket, name, &label, parent.as_deref()).await
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -217,37 +214,3 @@ async fn subvol_snapshot_send(
|
|||
)
|
||||
.await
|
||||
}
|
||||
|
||||
/// `subvol snapshot push <agent> <label> [--parent <label>]` — stream a
|
||||
/// snapshot to the swarm's snapshot store over the mesh.
|
||||
///
|
||||
/// The network sibling of `send`. Nothing is staged on this host, so
|
||||
/// there is no path to print: success is silent apart from the
|
||||
/// confirmation below. No destination argument — a swarm has one store,
|
||||
/// and the daemon reads its address from the host config.
|
||||
async fn subvol_snapshot_push(
|
||||
socket: &Path,
|
||||
name: &str,
|
||||
label: &str,
|
||||
parent: Option<&str>,
|
||||
) -> Result<()> {
|
||||
daemon_request(
|
||||
socket,
|
||||
hive_host_sock::HostRequest::PushSnapshot {
|
||||
name: crate::util::parse_ident(name)?,
|
||||
label: label.to_owned(),
|
||||
parent: parent.map(str::to_owned),
|
||||
},
|
||||
"snapshot push",
|
||||
)
|
||||
.await?;
|
||||
match parent {
|
||||
Some(p) => {
|
||||
println!(
|
||||
"pushed {name} snapshot {label:?} (incremental from {p:?}) to the swarm store"
|
||||
);
|
||||
}
|
||||
None => println!("pushed {name} snapshot {label:?} (full) to the swarm store"),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue