fix(mgr): skip guests that reject IPv6 config instead of failing reapply

vps-ipv6.service runs `vps ipv6-reapply`, which failed hard when a
single container (e.g. a user-broken networkd) rejected its config.
That aborted `systemctl enable --now vps-ipv6` during install and left
`vps install` halfway, with the panel service stopped.

Align ipv6-reapply with the install path: treat RoutedIPv6Error as a
warning and move on, so one bad guest cannot take down the boot unit or
the panel. Host-level errors still abort.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This commit is contained in:
bluebluesodaandCommandCodeBot committed 2026-08-22 10:04:06 +00:00
1 parent 990f1a2a71
commit a1cb6595ce
1 file changed
+11 -1
+11 -1
View File
@@ -429,7 +429,17 @@ func cmdIPv6Reapply() error {
// Also re-apply the per-container routed-IPv6 config, so the boot unit and
// a manual `vps ipv6-reapply` heal containers that were created before
// the host-routed scheme existed or whose networkd config got corrupted.
return m.EnsureRoutedIPv6()
// One guest that rejects its config (e.g. a user-broken networkd) must not
// fail the whole pass: log it and move on, so vps-ipv6.service stays up and
// the panel comes back. Genuine host-level errors still abort.
if err := m.EnsureRoutedIPv6(); err != nil {
var guestErr *mgr.RoutedIPv6Error
if !errors.As(err, &guestErr) {
return err
}
log.Printf("warning: routed IPv6 was not applied to container %s: %v; skipping", guestErr.Container, guestErr.Err)
}
return nil
}
func writeUnit(name, content string) error {