Ala Hino has uploaded a new change for review. Change subject: core: Refresh base volume before live merge ......................................................................
core: Refresh base volume before live merge When performing live merge where the base volume format is RAW, i.e. there is a single snapshot and it is live merged, we have to refresh the volume before performing the live merge. This is needed because extending the base volume is done on the SPM and refresh volume will cause other hosts to refresh the volume to get the new size. Not doing so may end up with libvirt error indicating that top volume size is larger than base volume, which exactly what happened in the reported BZ. Change-Id: I787d6854e780035b09e4f09d71ca776342dff5be Bug-Url: https://bugzilla.redhat.com/1367281 Signed-off-by: Ala Hino <[email protected]> --- M vdsm/virt/vm.py 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/63454/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 9cfa4a3..01b5d21 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -4433,6 +4433,18 @@ if not self._can_merge_into(drive, baseInfo, topInfo): return errCode['destVolumeTooSmall'] + # If the base volume format is RAW, we have to refresh the volume + # in order to enforce other hosts to load new volume size. Not + # doing so may end up with error that top volume size is larger + # base volume size. This could happen if disk extended after taking + # a snapshot but before performing the live merge. + # See https://bugzilla.redhat.com/1367281 + if drive.chunked and baseInfo['format'] == 'RAW': + self.__refreshDriveVolume({ + 'domainID': drive.domainID, 'poolID': drive.poolID, + 'imageID': drive.imageID, 'volumeID': baseVolUUID, + }) + # Take the jobs lock here to protect the new job we are tracking from # being cleaned up by queryBlockJobs() since it won't exist right away with self._jobsLock: -- To view, visit https://gerrit.ovirt.org/63454 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I787d6854e780035b09e4f09d71ca776342dff5be Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/admin/lists/[email protected]
