Daniel Erez has submitted this change and it was merged. Change subject: core: ensure unique unit for VirtIO_SCSI and SPAR_VSCSI disks ......................................................................
core: ensure unique unit for VirtIO_SCSI and SPAR_VSCSI disks Ensuring a unique address unit value for disks attached with VirtIO_SCSI or SPAR_VSCSI interfaces. The selected units may collide as the search process is depended on the VmDevice addresses which are updated asynchronously by the VmsMonitoring. E.g. when hot-plugging multiple disks using a script, identical unit values might be selected for different disks. Hence: * Moved address creation logic to BLL layer (AbstractDiskVmCommand). * Updating VmDevice address in DB right after selecting an available unit value. * Taking an EngineLock on 'getDiskAddressMap' method to avoid races. Change-Id: I5e621618e8891fca52b48bff437cc4c2a1f695db Bug-Url: https://bugzilla.redhat.com/1206374 Signed-off-by: Daniel Erez <de...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/locks/LockingGroup.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/HotPlugDiskVDSParameters.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugDiskVDSCommand.java 4 files changed, 122 insertions(+), 61 deletions(-) Approvals: Daniel Erez: Verified Liron Aravot: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/39471 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e621618e8891fca52b48bff437cc4c2a1f695db Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Vitor de Lima <vdel...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches