Skip to content

Commit

Permalink
core: always update volume size when creating a new image
Browse files Browse the repository at this point in the history
Vdsm often aligns the size of the volume when creating, and the volume
will end up having a different size in the engine than what is on the
storage. This is already handled when a new disk is created but not when
a new snapshot is created.

Since there is already a getVolumeInfo request at the end of snapshot
creation, we can use this opportunity to update the size of the volume
as well.

Bug-Url: https://bugzilla.redhat.com/1852308
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
  • Loading branch information
bennyz committed May 17, 2022
1 parent e834d72 commit b5a549a
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -384,6 +384,9 @@ protected void endSuccessfully() {
newStorageDomainID,
getDestinationDiskImage());
}

// Update disk's size if it's changed
getDestinationDiskImage().setSize(newImageIRS.getSize());
}
} catch (EngineException e) {
// Logging only
Expand Down

0 comments on commit b5a549a

Please sign in to comment.