Change in vdsm[master]: vm: return full copy of the conf data on status()

nsoffer at redhat.com nsoffer at redhat.com
Wed Nov 5 16:14:17 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: vm: return full copy of the conf data on status()
......................................................................


Patch Set 3: Code-Review+1

(2 comments)

Commit message can be improved.

http://gerrit.ovirt.org/#/c/34147/3//COMMIT_MSG
Commit Message:

Line 7: vm: return full copy of the conf data on status()
Line 8: 
Line 9: It is unsafe for status() to return a shallow copy
Line 10: of the Vm.conf data.
Line 11: 
The exception in json encoder is relevant here:
http://gerrit.ovirt.org/#/c/34813/1//COMMIT_MSG

Probably some part of it, the full stacktrace is not interesting.
Line 12: This patch makes it always return a full copy.
Line 13: 
Line 14: Change-Id: I604f8534c9380d289633df4a8151699ab0d97e34
Line 15: Related-To: https://bugzilla.redhat.com/1151953


http://gerrit.ovirt.org/#/c/34147/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 1747: 
Line 1748:     def _saveStateInternal(self):
Line 1749:         if self._destroyed:
Line 1750:             return
Line 1751:         toSave = self.status()
Nice!
Line 1752:         toSave['startTime'] = self._startTime
Line 1753:         if self.lastStatus != vmstatus.DOWN and self._vmStats:
Line 1754:             toSave['username'] = self.guestAgent.guestInfo['username']
Line 1755:             toSave['guestIPs'] = self.guestAgent.guestInfo['guestIPs']


-- 
To view, visit http://gerrit.ovirt.org/34147
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I604f8534c9380d289633df4a8151699ab0d97e34
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list