Change in vdsm[master]: virt: add device setup and teardown

fromani at redhat.com fromani at redhat.com
Mon Apr 4 07:43:00 UTC 2016


Francesco Romani has posted comments on this change.

Change subject: virt: add device setup and teardown
......................................................................


Patch Set 4: Code-Review+1

(3 comments)

conceptually fine, we may want to tune some details of the implementation. Partial ACK to have further discussion.

https://gerrit.ovirt.org/#/c/55135/4/vdsm/virt/vm.py
File vdsm/virt/vm.py:

PS4, Line 1689: for dev_objects in self._devices.values():
> This is safe in both 2 and 3 as it iterates over device types (those are st
correct


PS4, Line 1690: for dev_object in dev_objects[:]
> This is also safe in both 2 and 3 as slice is still a copy
correct again, but what are we guarding against here?
It seems to me that the most likely issue is a concurrent hotplug/hotunplung, so the correct fix is a device lock.

We can't solve this nicely in the current architecture, so I believe this is good enough.


PS4, Line 1866:             for dev_objects in self._devices.values():
              :                 for dev_object in dev_objects[:]:
For a future patch:
I wonder if an utility method that returns all the existing device object in a safe way could be helpful here.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f99b855de43cff693b99b6873a835b7ad56db1b
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list