Allon Mureinik has submitted this change and it was merged.
Change subject: core: NPEs and wrong persisted information when reusing LUNs
......................................................................
core: NPEs and wrong persisted information when reusing LUNs
Generally, the following issues caused that a created storage domain
on pre-existing luns storage led to NPEs and wrong data shown to the user during execution
of GetLunsByVgIdQuery.
This patch fixes the following issues:
1. When removing a domain that used LUN storage and there's a disk used by that LUN -
LUNs volume_group_id still contains the removed domain id which doesn't exist
anymore.
2. When extending a domain to use an existing LUN, the domain id isn't
set to that LUN which causes to NPE in GetLunsByVgIdQuery or wrong data
provided to the user.
3. When creating a domain from an existing LUN, the domain id isn't set
to this LUN which might causes to NPE in GetLunsByVgIdQuery or
wrong data provided to the user.
4. When removing LUN disk which isn't used as storage domain (and
therefore - not used anymore), the LUN remained in the DB.
Change-Id: I38a0e3c68cb8bd80c2f78ee5aacfccc8c987a79e
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=875909
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M backend/manager/dbscripts/storages_san_sp.sql
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddSANStorageDomainCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ExtendSANStorageDomainCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/FCPStorageHelper.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LunDAO.java
M
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LunDAODbFacadeImpl.java
M
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LunDAOHibernateImpl.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/LunDAOTest.java
12 files changed, 87 insertions(+), 26 deletions(-)
Approvals:
Allon Mureinik: Looks good to me, approved
Liron Aravot: Verified
--
To view, visit
http://gerrit.ovirt.org/9229
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I38a0e3c68cb8bd80c2f78ee5aacfccc8c987a79e
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Daniel Paikov <paikov(a)gmail.com>
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin(a)redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk(a)redhat.com>