Skip to content

Commit

Permalink
Merge pull request #1060 from stgraber/main
Browse files Browse the repository at this point in the history
incusd/storage/zfs: Always call tryGetVolumeDiskPathFromDataset
  • Loading branch information
hallyn authored Jul 31, 2024
2 parents 8828254 + ecbe1e1 commit 0a04d95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/server/storage/drivers/driver_zfs_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,11 @@ func (d *zfs) getVolumeDiskPathFromDataset(dataset string) (string, error) {

// GetVolumeDiskPath returns the location of a root disk block device.
func (d *zfs) GetVolumeDiskPath(vol Volume) (string, error) {
return d.getVolumeDiskPathFromDataset(d.dataset(vol, false))
// Wait up to 30 seconds for the device to appear.
ctx, cancel := context.WithTimeout(d.state.ShutdownCtx, 30*time.Second)
defer cancel()

return d.tryGetVolumeDiskPathFromDataset(ctx, d.dataset(vol, false))
}

// ListVolumes returns a list of volumes in storage pool.
Expand Down

0 comments on commit 0a04d95

Please sign in to comment.