Skip to content

Commit

Permalink
lxd/storage: Only freeze if not frozen
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
stgraber committed Oct 30, 2020
1 parent a0d7daf commit 4d57519
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lxd/storage/backend_lxd.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ func (b *lxdBackend) CreateInstanceFromCopy(inst instance.Instance, src instance
}

// Some driver backing stores require that running instances be frozen during copy.
if !src.IsSnapshot() && b.driver.Info().RunningCopyFreeze && src.IsRunning() {
if !src.IsSnapshot() && b.driver.Info().RunningCopyFreeze && src.IsRunning() && !src.IsFrozen() {
err = src.Freeze()
if err != nil {
return err
Expand Down Expand Up @@ -1723,7 +1723,7 @@ func (b *lxdBackend) CreateInstanceSnapshot(inst instance.Instance, src instance
}

// Some driver backing stores require that running instances be frozen during snapshot.
if b.driver.Info().RunningCopyFreeze && src.IsRunning() {
if b.driver.Info().RunningCopyFreeze && src.IsRunning() && !src.IsFrozen() {
err = src.Freeze()
if err != nil {
return err
Expand Down

0 comments on commit 4d57519

Please sign in to comment.