Change in ovirt-engine[ovirt-engine-3.6]: hostdev: Fix cleanup treatment in RefreshHostDevicesCommand

tnisan at redhat.com tnisan at redhat.com
Tue Mar 15 16:01:15 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: hostdev: Fix cleanup treatment in RefreshHostDevicesCommand
......................................................................


hostdev: Fix cleanup treatment in RefreshHostDevicesCommand

The host device refresh logic that clears up vm_devices for host_devices that
disappear from host incorrectly assumed that only one device with given name
will exist in the vm_device table, which was incorrect for multiple reasons
(one host_device attached to multiple VMs or device with same name from
different host).

Fixed by explicitly querying vm_device attachments only for current host and
removing all with given name.

Change-Id: I8f39599928195e9c485bf0e0a206caf6b821f580
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1312879
Signed-off-by: Martin Betak <mbetak at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdev/RefreshHostDevicesCommand.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/HostDeviceDao.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/HostDeviceDaoImpl.java
M packaging/dbscripts/host_device_sp.sql
4 files changed, 53 insertions(+), 8 deletions(-)

Approvals:
  Tomas Jelinek: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Martin Betak: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f39599928195e9c485bf0e0a206caf6b821f580
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list