fix: slog.Warn on instance kv migration failure

This commit is contained in:
Julian Sommer
2026-05-06 13:51:34 +10:00
parent f0eea9867b
commit 8f7733eb64
+8 -1
View File
@@ -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
}