Change in vdsm[master]: vm: conf: proper locking in status()

danken at redhat.com danken at redhat.com
Tue Apr 5 10:50:22 UTC 2016


Dan Kenigsberg has posted comments on this change.

Change subject: vm: conf: proper locking in status()
......................................................................


Patch Set 2: Code-Review+2

(1 comment)

https://gerrit.ovirt.org/#/c/54906/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 1304:             return {'vmId': self.id, 'status': self.lastStatus,
Line 1305:                     'statusTime': self._get_status_time()}
Line 1306: 
Line 1307:         with self._confLock:
Line 1308:             self.conf['status'] = self.lastStatus
I can pay the price of an extended lock so that I can forget about whehter 'status' is always in conf.
Line 1309:             # Filter out any internal keys
Line 1310:             status = dict((k, v) for k, v in self.conf.iteritems()
Line 1311:                           if not k.startswith("_"))
Line 1312:             status['guestDiskMapping'] = self.guestAgent.guestDiskMapping


-- 
To view, visit https://gerrit.ovirt.org/54906
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I397562bb94c8b696a0b34484907e7d489a800878
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list