Change in vdsm[master]: LiveMerge: Add liveMerge capability to vdsCaps
Dan Kenigsberg has posted comments on this change. Change subject: LiveMerge: Add liveMerge capability to vdsCaps .. Patch Set 1: Code-Review+2 Could be merged if placed first in branch. -- To view, visit http://gerrit.ovirt.org/28998 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac66c679166b5687ed3940e517fe6827fe10e258 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke ali...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: LiveMerge: Add liveMerge capability to vdsCaps
Francesco Romani has posted comments on this change. Change subject: LiveMerge: Add liveMerge capability to vdsCaps .. Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/28998/1/vdsm/rpc/vdsmapi-schema.json File vdsm/rpc/vdsmapi-schema.json: Line 1155: # @kdumpStatus: The current status of kdump configuration for the host: Line 1156: # enabled (1), disabled(0), unknown(-1) Line 1157: # (new in version 4.15.0) Line 1158: # Line 1159: # @liveMerge: #optional Indicates if live merge is supported on this Thanks for your review! I never thought of this semantic! But I definitely see your point, and I'm fine with it. Let'a see what the maintainer (Dan) thinks about this. Line 1160: # host. Line 1161: # (new in version 4.15.0) Line 1162: # Line 1163: # Since: 4.15.0 -- To view, visit http://gerrit.ovirt.org/28998 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac66c679166b5687ed3940e517fe6827fe10e258 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke ali...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: LiveMerge: Add liveMerge capability to vdsCaps
Adam Litke has uploaded a new change for review. Change subject: LiveMerge: Add liveMerge capability to vdsCaps .. LiveMerge: Add liveMerge capability to vdsCaps It is desirable for engine to know up front if a host can support live merge so the UI can either enable or disable the 'Delete' snapshot command based on presence of the feature. Change-Id: Iac66c679166b5687ed3940e517fe6827fe10e258 Signed-off-by: Adam Litke ali...@redhat.com --- M vdsm/caps.py M vdsm/rpc/vdsmapi-schema.json M vdsm/virt/vm.py 3 files changed, 32 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/28998/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index 68851c9..e8c4844 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -246,6 +246,26 @@ @utils.memoized +def getLiveMergeSupport(): + +Determine if libvirt provides the necessary features to enable live merge. +We check for the existence of several libvirt flags to serve as indicators: + +VIR_DOMAIN_BLOCK_COMMIT_RELATIVE indicates that libvirt can maintain +relative backing file path names when rewriting a backing chain. + +VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 indicates that libvirt can pass a drive +name (ie. vda) rather than a path to the block job event callback. + +for flag in ('VIR_DOMAIN_BLOCK_COMMIT_RELATIVE', + 'VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2'): +if not hasattr(libvirt, flag): +logging.debug(libvirt is missing '%s': live merge disabled, flag) +return False +return True + + +@utils.memoized def getNumaTopology(): capabilities = _getCapsXMLStr() caps = minidom.parseString(capabilities) @@ -609,6 +629,7 @@ liveSnapSupported = _getLiveSnapshotSupport(targetArch) if liveSnapSupported is not None: caps['liveSnapshot'] = str(liveSnapSupported).lower() +caps['liveMerge'] = str(getLiveMergeSupport()).lower() caps['kdumpStatus'] = _getKdumpStatus() return caps diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json index 2ccf963..486a7cb 100644 --- a/vdsm/rpc/vdsmapi-schema.json +++ b/vdsm/rpc/vdsmapi-schema.json @@ -1155,6 +1155,11 @@ # @kdumpStatus: The current status of kdump configuration for the host: # enabled (1), disabled(0), unknown(-1) # (new in version 4.15.0) +# +# @liveMerge: #optional Indicates if live merge is supported on this +# host. +# (new in version 4.15.0) +# # Since: 4.15.0 # # Notes: Since ovirt-engine cannot parse software versions in 'x.y.z' format, @@ -1179,7 +1184,7 @@ 'numaNodeDistance': 'NumaNodeDistanceMap', 'autoNumaBalancing': 'AutoNumaBalancingStatus', 'selinux': 'SELinuxStatus', '*liveSnapshot': 'bool', - 'kdumpStatus': 'int'}} + 'kdumpStatus': 'int', '*liveMerge': 'bool'}} ## # @Host.getCapabilities: diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index abdd9b0..216d2a7 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -5476,6 +5476,10 @@ return jobs def merge(self, driveSpec, baseVolUUID, topVolUUID, bandwidth, jobUUID): +if not caps.getLiveMergeSupport(): +self.log.error(Live merge is not supported on this host) +return errCode['mergeErr'] + bandwidth = int(bandwidth) if jobUUID is None: jobUUID = str(uuid.uuid4()) @@ -5519,12 +5523,7 @@ # Indicate that we expect libvirt to maintain the relative paths of # backing files. This is necessary to ensure that a volume chain is # visible from any host even if the mountpoint is different. -try: -flags = libvirt.VIR_DOMAIN_BLOCK_COMMIT_RELATIVE -except AttributeError: -self.log.error(Libvirt missing VIR_DOMAIN_BLOCK_COMMIT_RELATIVE. - Unable to perform live merge.) -return errCode['mergeErr'] +flags = libvirt.VIR_DOMAIN_BLOCK_COMMIT_RELATIVE if topVolUUID == drive.volumeID: # Pass a flag to libvirt to indicate that we expect a two phase -- To view, visit http://gerrit.ovirt.org/28998 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac66c679166b5687ed3940e517fe6827fe10e258 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke ali...@redhat.com ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: LiveMerge: Add liveMerge capability to vdsCaps
Francesco Romani has posted comments on this change. Change subject: LiveMerge: Add liveMerge capability to vdsCaps .. Patch Set 1: Code-Review+1 (1 comment) http://gerrit.ovirt.org/#/c/28998/1/vdsm/rpc/vdsmapi-schema.json File vdsm/rpc/vdsmapi-schema.json: Line 1155: # @kdumpStatus: The current status of kdump configuration for the host: Line 1156: # enabled (1), disabled(0), unknown(-1) Line 1157: # (new in version 4.15.0) Line 1158: # Line 1159: # @liveMerge: #optional Indicates if live merge is supported on this nit: in caps.py I see you always add this value, so it is not optional but always present. Line 1160: # host. Line 1161: # (new in version 4.15.0) Line 1162: # Line 1163: # Since: 4.15.0 -- To view, visit http://gerrit.ovirt.org/28998 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac66c679166b5687ed3940e517fe6827fe10e258 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke ali...@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: LiveMerge: Add liveMerge capability to vdsCaps
oVirt Jenkins CI Server has posted comments on this change. Change subject: LiveMerge: Add liveMerge capability to vdsCaps .. Patch Set 1: Build Successful http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9499/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10283/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/10439/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5365/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/3523/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/942/ : SUCCESS -- To view, visit http://gerrit.ovirt.org/28998 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac66c679166b5687ed3940e517fe6827fe10e258 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke ali...@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: LiveMerge: Add liveMerge capability to vdsCaps
Adam Litke has posted comments on this change. Change subject: LiveMerge: Add liveMerge capability to vdsCaps .. Patch Set 1: Verified+1 (1 comment) http://gerrit.ovirt.org/#/c/28998/1/vdsm/rpc/vdsmapi-schema.json File vdsm/rpc/vdsmapi-schema.json: Line 1155: # @kdumpStatus: The current status of kdump configuration for the host: Line 1156: # enabled (1), disabled(0), unknown(-1) Line 1157: # (new in version 4.15.0) Line 1158: # Line 1159: # @liveMerge: #optional Indicates if live merge is supported on this nit: in caps.py I see you always add this value, so it is not optional but Thanks for your review! My reading of optional is that all new fields added to existing structures must be optional since they are missing in older versions. Therefore, all API clients need to cope with the fact that the item may not always be present. Line 1160: # host. Line 1161: # (new in version 4.15.0) Line 1162: # Line 1163: # Since: 4.15.0 -- To view, visit http://gerrit.ovirt.org/28998 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac66c679166b5687ed3940e517fe6827fe10e258 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke ali...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Greg Padgett gpadg...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches