hivectl: batch QueueNodes polling by id set, drop remaining dag wording
This commit is contained in:
parent
309c1c91c6
commit
0c4d56a585
8 changed files with 182 additions and 125 deletions
|
|
@ -7,7 +7,7 @@ use std::path::Path;
|
|||
use anyhow::{Context as _, Result, bail};
|
||||
|
||||
use crate::cli::{SnapshotCmd, SubvolCmd};
|
||||
use crate::dag_progress::wait_for_dags;
|
||||
use crate::dag_progress::wait_for_nodes;
|
||||
use crate::util::{agent_exists, daemon_request};
|
||||
|
||||
/// A [`LifecycleScope`](hive_host_sock::LifecycleScope) targeting exactly one
|
||||
|
|
@ -78,10 +78,10 @@ async fn subvol_upgrade(socket: &Path, name: &str, yes: bool) -> Result<()> {
|
|||
stop_resp.error.as_deref().unwrap_or("unknown error")
|
||||
);
|
||||
}
|
||||
// The stop is a queued DAG now — the migration below snapshots +
|
||||
// The stop is a queued job now — the migration below snapshots +
|
||||
// swaps the state dir and MUST NOT run under a live bind mount, so
|
||||
// wait for the stop to actually execute before touching anything.
|
||||
wait_for_dags(socket, stop_resp.queued_dags.unwrap_or_default(), false)
|
||||
wait_for_nodes(socket, stop_resp.queued_dags.unwrap_or_default(), false)
|
||||
.await
|
||||
.with_context(|| format!("waiting for {name} to stop before the migration"))?;
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ async fn subvol_upgrade(socket: &Path, name: &str, yes: bool) -> Result<()> {
|
|||
start_resp.error.as_deref().unwrap_or("unknown error")
|
||||
);
|
||||
}
|
||||
wait_for_dags(socket, start_resp.queued_dags.unwrap_or_default(), false)
|
||||
wait_for_nodes(socket, start_resp.queued_dags.unwrap_or_default(), false)
|
||||
.await
|
||||
.with_context(|| {
|
||||
format!(
|
||||
|
|
|
|||
Loading…
Reference in a new issue