Change in ovirt-engine[master]: core: ensure unique unit for VirtIO_SCSI and SPAR_VSCSI disks

derez at redhat.com derez at redhat.com
Sun Jun 7 09:46:54 UTC 2015


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 <derez at 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 <derez at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdelima at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list