From ac214a023e3d823a8231c365656cfa27703f27d5 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 13:13:44 +0000 Subject: enstate: reactions after applying, and after a switch After applying, units are restarted or reloaded, and started if they aren't running: they may have failed for want of their views. That happens with the store's lock released: a unit restarted may want the one that runs --migrate, which waits for the lock. After a switch, --migrate runs from the unit that units using views are ordered after, so only running units react, without waiting for them (--no-block try-restart, try-reload-or-restart). --- src/migrate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/migrate.rs') diff --git a/src/migrate.rs b/src/migrate.rs index 340180f..dbbf38d 100644 --- a/src/migrate.rs +++ b/src/migrate.rs @@ -23,7 +23,7 @@ use serde::Serialize; use crate::content::Content; use crate::name::Address; -use crate::plan::{ViewOutcome, react}; +use crate::plan::{Reacting, ViewOutcome, react}; use crate::schema::{Reactions, Schema}; use crate::scratch::Scratch; use crate::store::{Kept, Snapshot, Store}; @@ -311,7 +311,7 @@ pub fn migrate( let failed = if dry_run { Vec::new() } else { - react(&reactions, systemctl) + react(&reactions, systemctl, Reacting::Migrate) }; Ok(Migration { accepted: refused.is_empty(), -- cgit v1.3.1