Change in vdsm[master]: virt: enable libgfapi with snapshot support
Nir Soffer has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 1: (4 comments) https://gerrit.ovirt.org/#/c/56906/1/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 3197 Line 3198 Line 3199 Line 3200 Line 3201 Needs rebase? This does not exist in master. Line 3192: hostAttrs = {} Line 3193: Line 3194: # TODO: unify these with the Drive.getXML() method Line 3195: if oldDrive.networkDev: Line 3196: sourceType = 'network' We have a constant for this, see virt/vmdevices/storage.py Line 3197: sourceAttrs.update({ Line 3198: 'name': newDriveDict['volumeInfo']['path'], Line 3199: 'protocol': newDriveDict['volumeInfo']['protocol']}) Line 3200: hostAttrs.update({ Line 3195: if oldDrive.networkDev: Line 3196: sourceType = 'network' Line 3197: sourceAttrs.update({ Line 3198: 'name': newDriveDict['volumeInfo']['path'], Line 3199: 'protocol': newDriveDict['volumeInfo']['protocol']}) These should use newDriveDict, not newDriveDict["volumeInto"]. Line 3200: hostAttrs.update({ Line 3201: 'name': newDriveDict['volumeInfo']['volfileServer'], Line 3202: 'port': newDriveDict['volumeInfo']['port'], Line 3203: 'transport': newDriveDict['volumeInfo']['transport']}) Line 3199: 'protocol': newDriveDict['volumeInfo']['protocol']}) Line 3200: hostAttrs.update({ Line 3201: 'name': newDriveDict['volumeInfo']['volfileServer'], Line 3202: 'port': newDriveDict['volumeInfo']['port'], Line 3203: 'transport': newDriveDict['volumeInfo']['transport']}) This should use Drive.hosts - probably the first host. Drive.volumeInfo should not be used, it is a leftover from legacy code. This code should be in vdsm/virt/vmdevices/storage.py. It mostly duplicate Drive.getXML(). It should also have tests - see vmStorageTests.py. Line 3204: else: Line 3205: sourceAttrs.update({'file': newDriveDict['path']}) Line 3206: Line 3207: disk = vmxml.Element('disk', name=vmDev, snapshot='external', -- To view, visit https://gerrit.ovirt.org/56906 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibbdedb8bf012fae2f69f4c8c5e952f5eb5ef9132 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Prasanna Kumar Kalever Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Nir Soffer has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 1: This should be rebased on https://gerrit.ovirt.org/56907, right? -- To view, visit https://gerrit.ovirt.org/56906 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibbdedb8bf012fae2f69f4c8c5e952f5eb5ef9132 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Prasanna Kumar Kalever Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Hello Ala Hino, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/56906 to review the following change. Change subject: virt: enable libgfapi with snapshot support .. virt: enable libgfapi with snapshot support Change-Id: Ibbdedb8bf012fae2f69f4c8c5e952f5eb5ef9132 Signed-off-by: Federico Simoncelli Signed-off-by: Ala Hino Signed-off-by: Prasanna Kumar Kalever --- M vdsm/virt/vm.py 1 file changed, 25 insertions(+), 13 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/56906/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 8ac6242..97d662d 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -3185,20 +3185,33 @@ def snapshot(self, snapDrives, memoryParams, frozen=False): """Live snapshot command""" -def _diskSnapshot(vmDev, newPath, sourceType): +def _diskSnapshot(vmDev, oldDrive, newDriveDict): """Libvirt snapshot XML""" +sourceType = 'file' +sourceAttrs = {} +hostAttrs = {} + +# TODO: unify these with the Drive.getXML() method +if oldDrive.networkDev: +sourceType = 'network' +sourceAttrs.update({ +'name': newDriveDict['volumeInfo']['path'], +'protocol': newDriveDict['volumeInfo']['protocol']}) +hostAttrs.update({ +'name': newDriveDict['volumeInfo']['volfileServer'], +'port': newDriveDict['volumeInfo']['port'], +'transport': newDriveDict['volumeInfo']['transport']}) +else: +sourceAttrs.update({'file': newDriveDict['path']}) disk = vmxml.Element('disk', name=vmDev, snapshot='external', type=sourceType) -# Libvirt versions before 1.2.2 do not understand 'type' and treat -# all snapshots as if they are type='file'. In order to ensure -# proper handling of block snapshots in modern libvirt versions, -# we specify type='block' and dev=path for block volumes but we -# always speficy the file=path for backwards compatibility. -args = {'type': sourceType, 'file': newPath} -if sourceType == 'block': -args['dev'] = newPath -disk.appendChildWithArgs('source', **args) + +source = disk.appendChildWithArgs('source', **sourceAttrs) + +if hostAttrs: +source.appendChildWithArgs('host', **hostAttrs) + return disk def _normSnapDriveParams(drive): @@ -3323,9 +3336,8 @@ _rollbackDrives(preparedDrives) return response.error('snapshotErr') -snapType = 'block' if vmDrives[vmDevName].blockDev else 'file' -snapelem = _diskSnapshot(vmDevName, newDrives[vmDevName]["path"], - snapType) +snapelem = _diskSnapshot(vmDevName, vmDrives[vmDevName], + newDrives[vmDevName]) disks.appendChild(snapelem) snap.appendChild(disks) -- To view, visit https://gerrit.ovirt.org/56906 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbdedb8bf012fae2f69f4c8c5e952f5eb5ef9132 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Prasanna Kumar Kalever Gerrit-Reviewer: Ala Hino ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
gerrit-hooks has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6']) -- To view, visit https://gerrit.ovirt.org/56906 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibbdedb8bf012fae2f69f4c8c5e952f5eb5ef9132 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Prasanna Kumar Kalever Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
gerrit-hooks has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Jenkins CI RO has abandoned this change. Change subject: virt: enable libgfapi with snapshot support .. Abandoned Abandoned due to no activity - please restore if still relevant -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Jenkins CI RO has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 4: Abandoned due to no activity - please restore if still relevant -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Nir Soffer has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/33768/4/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 2937: if oldDrive.networkDev: Line 2938: sourceType = 'network' Line 2939: sourceAttrs.update({ Line 2940: 'name': newDriveDict['volumeInfo']['path'], Line 2941: 'protocol': newDriveDict['volumeInfo']['protocol']}) There is no volumeInfo, you should have killed it in the previous patch. This should use newDriveDict["path"], and newDriveDict["protocol"] etc. Line 2942: hostAttrs.update({ Line 2943: 'name': newDriveDict['volumeInfo']['volfileServer'], Line 2944: 'port': newDriveDict['volumeInfo']['port'], Line 2945: 'transport': newDriveDict['volumeInfo']['transport']}) Line 2941: 'protocol': newDriveDict['volumeInfo']['protocol']}) Line 2942: hostAttrs.update({ Line 2943: 'name': newDriveDict['volumeInfo']['volfileServer'], Line 2944: 'port': newDriveDict['volumeInfo']['port'], Line 2945: 'transport': newDriveDict['volumeInfo']['transport']}) This should use the "hosts" attribute of the new drive. Line 2946: else: Line 2947: sourceAttrs.update({'file': newDriveDict['path']}) Line 2948: Line 2949: disk = vmxml.Element('disk', name=vmDev, snapshot='external', -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Tal Nisan 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]: virt: enable libgfapi with snapshot support
automat...@ovirt.org has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 4: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Nir Soffer has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: Ala will continue with this patch, hopefully he will make some progress soon. -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Dan Kenigsberg has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: Code-Review-1 requires rebase, according to Nir -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Nir Soffer has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: -Code-Review (3 comments) https://gerrit.ovirt.org/#/c/33768/3/vdsm/storage/hsm.py File vdsm/storage/hsm.py: Line 3215 Line 3216 Line 3217 Line 3218 Line 3219 +1 Line 3227 Line 3228 Line 3229 Line 3230 Line 3231 +1 Line 3230 Line 3231 Line 3232 Line 3233 Line 3234 In another patch, lets rename imgVolumesInfo to volumeChain, same term used in the rest of the code. -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Tal Nisan 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]: virt: enable libgfapi with snapshot support
Nir Soffer has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: Code-Review-1 Must be rebased on ceph patches, adding new diskType. -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Tal Nisan has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: ping? -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Tal Nisan Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
Nir Soffer has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: (2 comments) https://gerrit.ovirt.org/#/c/33768/3/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 3705 Line 3706 Line 3707 Line 3708 Line 3709 We require now libvirt 1.2.8, so we can remove this hack. Line 3708: 'protocol': newDriveDict['volumeInfo']['protocol']}) Line 3709: hostAttrs.update({ Line 3710: 'name': newDriveDict['volumeInfo']['volfileServer'], Line 3711: 'port': newDriveDict['volumeInfo']['volPort'], Line 3712: 'transport': newDriveDict['volumeInfo']['volTransport']}) Should use new diskType, hosts, and protocol, introduced in the ceph topic: https://gerrit.ovirt.org/#/q/status:open+project:vdsm+branch:master+topic:ceph Move to Drive.getSnapshotXML()? Line 3713: else: Line 3714: sourceAttrs.update({'file': newDriveDict['path']}) Line 3715: Line 3716: # Libvirt versions before 1.2.2 do not understand 'type' -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Sandro Bonazzola 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]: virt: enable libgfapi with snapshot support
Sandro Bonazzola has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: Verified+1 Code-Review+1 -- To view, visit https://gerrit.ovirt.org/33768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: enable libgfapi with snapshot support
oVirt Jenkins CI Server has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 3: Build Failed http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/13551/ : FAILURE http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/14508/ : FAILURE http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/14340/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/2074/ : There was an infra issue, please contact in...@ovirt.org -- To view, visit http://gerrit.ovirt.org/33768 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks 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]: virt: enable libgfapi with snapshot support
oVirt Jenkins CI Server has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 2: Build Failed http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12820/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11872/ : FAILURE http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1748/ : There was an infra issue, please contact in...@ovirt.org http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12663/ : SUCCESS -- To view, visit http://gerrit.ovirt.org/33768 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks 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]: virt: enable libgfapi with snapshot support
oVirt Jenkins CI Server has posted comments on this change. Change subject: virt: enable libgfapi with snapshot support .. Patch Set 1: Build Failed http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11804/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12750/ : FAILURE http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1721/ : There was an infra issue, please contact in...@ovirt.org http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12593/ : SUCCESS -- To view, visit http://gerrit.ovirt.org/33768 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Jason Brooks 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]: virt: enable libgfapi with snapshot support
Federico Simoncelli has uploaded a new change for review. Change subject: virt: enable libgfapi with snapshot support .. virt: enable libgfapi with snapshot support Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Signed-off-by: Federico Simoncelli --- M vdsm/storage/hsm.py M vdsm/virt/vm.py 2 files changed, 38 insertions(+), 17 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/33768/1 diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py index cd6f4b9..bde04be 100644 --- a/vdsm/storage/hsm.py +++ b/vdsm/storage/hsm.py @@ -3225,8 +3225,7 @@ path = os.path.join(dom.domaindir, sd.DOMAIN_IMAGES, imgUUID, volUUID) volInfo = {'domainID': sdUUID, 'imageID': imgUUID, - 'volumeID': volUUID, 'path': path, - 'volType': "path"} + 'volumeID': volUUID, 'path': path} leasePath, leaseOffset = dom.getVolumeLease(imgUUID, volUUID) @@ -3237,8 +3236,8 @@ }) imgVolumesInfo.append(volInfo) -if volUUID == leafUUID: -leafInfo = volInfo + +leafInfo = dom.produceVolume(imgUUID, volUUID).getVmVolumeInfo() return {'path': leafPath, 'info': leafInfo, 'imgVolumesInfo': imgVolumesInfo} diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 1eebb69..af0830a 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -3821,20 +3821,43 @@ def snapshot(self, snapDrives, memoryParams): """Live snapshot command""" -def _diskSnapshot(vmDev, newPath, sourceType): +def _diskSnapshot(vmDev, oldDrive, newDriveDict): """Libvirt snapshot XML""" +sourceType = 'file' +sourceAttrs = {} +hostAttrs = {} + +# TODO: unify these with the Drive.getXML() method +if oldDrive.networkDev: +sourceType = 'network' +sourceAttrs.update({ +'name': newDriveDict['volumeInfo']['path'], +'protocol': newDriveDict['volumeInfo']['protocol']}) +hostAttrs.update({ +'name': newDriveDict['volumeInfo']['volfileServer'], +'port': newDriveDict['volumeInfo']['volPort'], +'transport': newDriveDict['volumeInfo']['volTransport']}) +else: +sourceAttrs.update({'file': newDriveDict['path']}) + +# Libvirt versions before 1.2.2 do not understand 'type' +# and treat all snapshots as if they are type='file'. +# In order to ensure proper handling of block snapshots +# in modern libvirt versions, we specify type='block' +# and dev=path for block volumes but we always speficy +# the file=path for backwards compatibility. +if oldDrive.blockDev: +sourceType = 'block' +sourceAttrs.update({'dev': newDriveDict['path']}) disk = vmxml.Element('disk', name=vmDev, snapshot='external', type=sourceType) -# Libvirt versions before 1.2.2 do not understand 'type' and treat -# all snapshots as if they are type='file'. In order to ensure -# proper handling of block snapshots in modern libvirt versions, -# we specify type='block' and dev=path for block volumes but we -# always speficy the file=path for backwards compatibility. -args = {'type': sourceType, 'file': newPath} -if sourceType == 'block': -args['dev'] = newPath -disk.appendChildWithArgs('source', **args) + +source = disk.appendChildWithArgs('source', **sourceAttrs) + +if hostAttrs: +source.appendChildWithArgs('host', **hostAttrs) + return disk def _normSnapDriveParams(drive): @@ -3964,9 +3987,8 @@ _rollbackDrives(preparedDrives) return errCode['snapshotErr'] -snapType = 'block' if vmDrives[vmDevName].blockDev else 'file' -snapelem = _diskSnapshot(vmDevName, newDrives[vmDevName]["path"], - snapType) +snapelem = _diskSnapshot(vmDevName, vmDrives[vmDevName], + newDrives[vmDevName]) disks.appendChild(snapelem) snap.appendChild(disks) -- To view, visit http://gerrit.ovirt.org/33768 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0965bef605ba67297670c0bf7924f88fa3b0460 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli ___ vdsm-patches mailing list vdsm-patches@lists.fe