1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

Merge pull request #2580 from stgraber/main

incusd/instance/lxc: Don't apply credentials update on stopped contai…
This commit is contained in:
Serge Hallyn
2025-10-23 09:36:43 -05:00
committed by GitHub

View File

@@ -9286,6 +9286,11 @@ func (d *lxc) CanLiveMigrate() bool {
// setupCredentials sets up the systemd credentials directory.
func (d *lxc) setupCredentials(update bool) error {
// Skip updating if the container isn't running.
if update && !d.IsRunning() {
return nil
}
credentialsDir := filepath.Join(d.Path(), "credentials")
credentials := map[string][]byte{}
oldCredentials := map[string]bool{}