Igor Lvovsky has uploaded a new change for review.
Change subject: Return domXml and its md5 per VM. ......................................................................
Return domXml and its md5 per VM.
Report full domXml per VM by using the 'list' verb with the option full = true. The 'getVmStats'/'getAllVmStats' verbs report the md5 of the domXml per VM.
Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 --- M vdsm/libvirtvm.py 1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/235/1 -- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Return domXml and its md5 per VM. ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(4 inline comments)
.................................................... File vdsm/libvirtvm.py Line 29: from hashlib import md5 on one had, md5 is passe'. on the other hand, we do not really need crypto strength. should we use a simpler lighter algorithm? CRC? Jenkins?
Line 1356: vm.Vm.status(self) I think it is nicer to copy the output, and not assume (the sad fact) that 'status' updates conf.
Line 1358: # _lastXMLDesc created at the end of LibvirtVM object creation _lastXMLDesc attribute is created on __init__. It will always be there. Is there any reason to check it every time?
Line 1367: stats['domxmlMD5'] = md5(self._lastXMLDesc).hexdigest() please call it "hash", I do not think we should commit ourselves to md5.
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Return domXml and its md5 per VM. ......................................................................
Patch Set 1: (4 inline comments)
.................................................... File vdsm/libvirtvm.py Line 29: from hashlib import md5 I'll use hash() instead
Line 1356: vm.Vm.status(self) Done
Line 1358: # _lastXMLDesc created at the end of LibvirtVM object creation lastXMLDesc doesn't created in __init__. But I can do some refactoring
Line 1367: stats['domxmlMD5'] = md5(self._lastXMLDesc).hexdigest() Done
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Add support of stable PCI addresses. ......................................................................
Patch Set 5: I would prefer that you didn't submit this
(5 inline comments)
.................................................... File vdsm/libvirtvm.py Line 829: if getattr(self, 'address', False): getattr -> hasattr is clearer in this context
Line 1437: devxml = xml.dom.minidom.parseString(self._dom.XMLDesc(0)) \ XMLDesc() may block, better use self._lastXML
it may make sense to cache hash(_lastXML) to avoid recalculation every 2 seconds.
Line 1454: controller = adrXml.getAttribute('controller') consider iterating over all exiting attributes. I'm not sure we should enforce the libvirt address standard. libvirt is good enough for that.
for k in d.childNodes[0].attributes.keys(): print k, '=', d.childNodes[0].getAttribute(k)
Line 1473: videosxml = xml.dom.minidom.parseString(self._dom.XMLDesc(0)) \ maybe we can avoid reading the same XMLDesc again and again (and use our cache instead)
Line 1482: # Video card device have not unique identifier, except the alias devices have, device has
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Support stable PCI addresses for video/sound/disk/nic devices. ......................................................................
Patch Set 7: Looks good to me, but someone else must approve
(1 inline comment)
.................................................... File vdsm/libvirtvm.py Line 1054: self._devXmlHash = '0' why "lie" instead of calculating it here, too?
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Support stable PCI addresses for video/sound/disk/nic devices. ......................................................................
Patch Set 7: Verified
(1 inline comment)
.................................................... File vdsm/libvirtvm.py Line 1054: self._devXmlHash = '0' because there is no 'devices' here. But I can calculate hash(_lastXMLDesc ) if you want.
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Support stable PCI addresses for video/sound/disk/nic devices. ......................................................................
Patch Set 7: Looks good to me, approved
Ok, let's break HEAD!
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Support stable PCI addresses for video/sound/disk/nic devices. ......................................................................
Patch Set 8: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Support stable PCI addresses for video/sound/disk/nic devices. ......................................................................
Patch Set 8: Verified
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Support stable PCI addresses for video/sound/disk/nic devices. ......................................................................
Patch Set 9: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Igor Lvovsky has submitted this change and it was merged.
Change subject: Support stable PCI addresses for video/sound/disk/nic devices. ......................................................................
Support stable PCI addresses for video/sound/disk/nic devices.
- The 'getVmStats'/'getAllVmStats' verbs report the hash of the device part of domXml per VM. - Return full vm's conf including device's addreses - Handle new addresses parameter in vm's create flow
Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 --- M vdsm/libvirtvm.py M vdsm/vm.py 2 files changed, 133 insertions(+), 12 deletions(-)
Approvals: Igor Lvovsky: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/235 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I5b3a97fa998d0f52ebe752024c62b8ec16c32c78 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
vdsm-patches@lists.fedorahosted.org