Change in vdsm[master]: Live Merge: Prevent merge when base volume is too small
fromani at redhat.com
fromani at redhat.com
Fri Jul 10 10:15:50 UTC 2015
Francesco Romani has posted comments on this change.
Change subject: Live Merge: Prevent merge when base volume is too small
......................................................................
Patch Set 3:
(5 comments)
https://gerrit.ovirt.org/#/c/42836/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 4614: return errCode['mergeErr']
Line 4615:
Line 4616: # If base is a shared volume then we cannot allow a merge. Otherwise
Line 4617: # We'd corrupt the shared volume for other users.
Line 4618: if baseInfo['voltype'] == 'SHARED':
> For another patch - don't we have a constant for "SHARED"?
in virt/vmdevices/storage.py you have DRIVE_SHARED_TYPE, not sure it can help you guys however, because it reads like:
...
SHARED = "shared"
Line 4619: self.log.error("merge: Refusing to merge into a shared volume")
Line 4620: return errCode['mergeErr']
Line 4621:
Line 4622: # Indicate that we expect libvirt to maintain the relative paths of
Line 4615:
Line 4616: # If base is a shared volume then we cannot allow a merge. Otherwise
Line 4617: # We'd corrupt the shared volume for other users.
Line 4618: if baseInfo['voltype'] == 'SHARED':
Line 4619: self.log.error("merge: Refusing to merge into a shared volume")
same as line 4613 I believe
Line 4620: return errCode['mergeErr']
Line 4621:
Line 4622: # Indicate that we expect libvirt to maintain the relative paths of
Line 4623: # backing files. This is necessary to ensure that a volume chain is
Line 4676:
Line 4677: return {'status': doneCode}
Line 4678:
Line 4679: def _can_merge_into(self, drive, base_info, top_info):
Line 4680: # If the drive waa resized the top volume could be larger than the
typo: was (?)
Line 4681: # base volume. Libvirt can handle this situation for filw-based
Line 4682: # volumes and block qcow volumes (where extension happens dynamically).
Line 4683: # Raw block volumes cannot be extended by libvirt so we require ovirt
Line 4684: # engine to extend them before calling merge. Check here.
Line 4677: return {'status': doneCode}
Line 4678:
Line 4679: def _can_merge_into(self, drive, base_info, top_info):
Line 4680: # If the drive waa resized the top volume could be larger than the
Line 4681: # base volume. Libvirt can handle this situation for filw-based
typo: file-based
Line 4682: # volumes and block qcow volumes (where extension happens dynamically).
Line 4683: # Raw block volumes cannot be extended by libvirt so we require ovirt
Line 4684: # engine to extend them before calling merge. Check here.
Line 4685: if not drive.blockDev or base_info['format'] != 'RAW':
Line 4867: if res['status']['code'] != 0:
Line 4868: raise StorageUnavailableError(
Line 4869: "Unable to get volume info for domain %s volume %s" %
Line 4870: (domainID, volumeID))
Line 4871: return res['info']
> Can you separate this change to another patch?
+1
Line 4872:
Line 4873: def _setVolumeSize(self, domainID, poolID, imageID, volumeID, size):
Line 4874: res = self.cif.irs.setVolumeSize(domainID, poolID, imageID, volumeID,
Line 4875: size)
--
To view, visit https://gerrit.ovirt.org/42836
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf77a7c5108b500c6ec34653ef7570a841def1b4
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list