From 8f7733eb64101473262ad53334deda65ae271908 Mon Sep 17 00:00:00 2001 From: Julian Sommer <115516918+juliansommer@users.noreply.github.com> Date: Wed, 6 May 2026 13:51:34 +1000 Subject: [PATCH] fix: slog.Warn on instance kv migration failure --- spinifex/vm/restore.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spinifex/vm/restore.go b/spinifex/vm/restore.go index 4d0e8aa97..76c0ba2ad 100644 --- a/spinifex/vm/restore.go +++ b/spinifex/vm/restore.go @@ -103,7 +103,14 @@ func (m *Manager) classifyRestoredInstances() []*VM { } if instance.Status == StateStopped { - m.MigrateStoppedToSharedKV(instance) + if !m.MigrateStoppedToSharedKV(instance) { + // KV write failed — keep in local state so the next restart + // retries the migration. Deleting here would create a "void": + // the instance disappears from both local state and the + // stopped KV, making it invisible to DescribeStoppedInstances. + slog.Warn("Stopped instance KV migration failed, will retry on next restart", + "instance", instance.ID) + } continue }