From 58bdcd43f52c8b889053324711f939195a046363 Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Mon, 27 Apr 2026 12:19:40 +1000 Subject: [PATCH] fix: order spinifex-daemon after openvswitch-switch on shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit systemd reverses After= on shutdown so daemon now runs CleanupTapDevice while ovsdb-server still answers. Eliminates orphan OVS port left in conf.db when host reboots — root trigger for "port already exists" on post-reboot RunInstances. spinifex-vpcd.service already had this; the daemon unit was missed. Also pull openvswitch-switch + ovn-controller into spinifex.target Wants so the platform brings them up explicitly rather than relying on implicit ordering from spinifex-vpcd alone. Bead: mulga-siv-20.1 Plan: docs/development/bugs/orphan-tap-on-launch-race.md (PR1a) --- build/systemd/spinifex-daemon.service | 2 +- build/systemd/spinifex.target | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/systemd/spinifex-daemon.service b/build/systemd/spinifex-daemon.service index 195a6128a..4dbf05b1d 100644 --- a/build/systemd/spinifex-daemon.service +++ b/build/systemd/spinifex-daemon.service @@ -1,7 +1,7 @@ [Unit] Description=Spinifex Daemon (VM Orchestration) PartOf=spinifex.target -After=spinifex-nats.service spinifex-viperblock.service +After=spinifex-nats.service spinifex-viperblock.service openvswitch-switch.service Wants=spinifex-nats.service [Service] diff --git a/build/systemd/spinifex.target b/build/systemd/spinifex.target index dcc4d5896..594f39fa0 100644 --- a/build/systemd/spinifex.target +++ b/build/systemd/spinifex.target @@ -2,7 +2,7 @@ Description=Spinifex Infrastructure Platform After=network-online.target Wants=network-online.target -Wants=spinifex-nats.service spinifex-predastore.service spinifex-viperblock.service spinifex-daemon.service spinifex-awsgw.service spinifex-vpcd.service spinifex-ui.service +Wants=spinifex-nats.service spinifex-predastore.service spinifex-viperblock.service spinifex-daemon.service spinifex-awsgw.service spinifex-vpcd.service spinifex-ui.service openvswitch-switch.service ovn-controller.service [Install] WantedBy=multi-user.target