Skip to content

Commit

Permalink
[lxd-import] lxd/patches: Fix patchStorageRenameCustomISOBlockVolumes…
Browse files Browse the repository at this point in the history
… when no storage pools exist

Signed-off-by: Thomas Parrott <[email protected]>
  • Loading branch information
tomponline authored and stgraber committed Oct 6, 2023
1 parent 0f4bb61 commit 650aac5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/incusd/patches.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,11 @@ func patchStorageRenameCustomISOBlockVolumes(name string, d *Daemon) error {
// Get all storage pool names.
pools, err := s.DB.Cluster.GetStoragePoolNames()
if err != nil {
// Skip the rest of the patch if no storage pools were found.
if api.StatusErrorCheck(err, http.StatusNotFound) {
return nil
}

return fmt.Errorf("Failed getting storage pool names: %w", err)
}

Expand Down

0 comments on commit 650aac5

Please sign in to comment.