Skip to content

Commit

Permalink
core: fix copying from MBS to image domain
Browse files Browse the repository at this point in the history
There is no need to reconstruct the sourceDisk as ManagedBlockDisk as it
is already of this type if the source domain is a Managed Block Storage
Domain, and it will fail later on as the conversion method createManagedBlockDiskFromDiskImage
assigns the target's id to the constructed object which is incorrect, as
this is the source disk.

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
  • Loading branch information
bennyz committed May 15, 2022
1 parent cc8a3dd commit 24afc08
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected void createVolumes() {
// Attach source to host (if source is Managed Block Storage)
// TODO: handle failures
if (sourceDomainType == StorageDomainType.ManagedBlockStorage) {
String sourcePath = attachVolume(createManagedBlockDiskFromDiskImage(sourceDisk));
String sourcePath = attachVolume((ManagedBlockStorageDisk) sourceDisk);
getParameters().setSourcePath(sourcePath);
}
}
Expand Down

0 comments on commit 24afc08

Please sign in to comment.