Alona Kaplan has posted comments on this change. Change subject: backend: Add HostDev passthrough support #3 ......................................................................
Patch Set 21: (1 comment) https://gerrit.ovirt.org/#/c/37619/21/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdev/RefreshHostDevicesCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdev/RefreshHostDevicesCommand.java: Line 87: } Line 88: } Line 89: Line 90: try { Line 91: hostDeviceManager.acquireHostDevicesLock(getVdsId()); > IIUC, the lock is needed to prevent the following scenario- Apparently, the vm id that is reported by the vdsm is the one that was passed to it by the engine. If a device was attached to a vm via a hook, a vm_id won't be reported. It means, the vdsm.vm_id doesn't have any extra value and can be ignored by the engine. If the engine ignores it, the race in the previous error can't happen. So, ignore my previous error:) The fix that should be done is, NOT reading the vm_id from the vdsm. I will send a patch with this fix. Line 92: TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { Line 93: @Override Line 94: public Void runInTransaction() { Line 95: hostDeviceDao.saveAllInBatch(newDevices); -- To view, visit https://gerrit.ovirt.org/37619 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I93c746cdda71678f7840d37683b890080a74341d Gerrit-PatchSet: 21 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches