Bug 1489463 - Leftover LUN in engine DB after restore with --he-remove-storage-vm (seen on FC)
Summary: Leftover LUN in engine DB after restore with --he-remove-storage-vm (seen on...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backup-Restore.Engine
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.1.7
: 4.1.7.3
Assignee: Simone Tiraboschi
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On: 1502747
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-07 13:49 UTC by Simone Tiraboschi
Modified: 2017-11-13 12:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Better filter DB values filtering out the hosted-engine storage domain at DB restore time. In the past there was a leftover in the LUN table if involved.
Clone Of:
Environment:
Last Closed: 2017-11-13 12:24:45 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 81737 0 master MERGED restore: delete referenced lun with he-remove-storage-vm 2017-10-03 13:50:19 UTC
oVirt gerrit 82541 0 ovirt-engine-4.1 MERGED restore: delete referenced lun with he-remove-storage-vm 2017-10-09 08:51:29 UTC

Description Simone Tiraboschi 2017-09-07 13:49:01 UTC
Description of problem:
After running "engine-backup --mode=restore --he-remove-storage-vm ..." the FC LUN used in the initial deployment is still saved in luns table.

If the new env is going to be deployed on the same LUN, the engine will fail importing the hosted-engine storage domain with 
 INFO  [org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommand] (org.ovirt.thread.pool-6-thread-34) [7d2e6cb2] There are existing luns in the system which are part of VG id 

Version-Release number of selected component (if applicable):
4.1.5

How reproducible:
tbd

Steps to Reproduce:
1. deploy hosted-engine on FC/iSCSI
2. take a backup with engine-backup
3. try to restore with --he-remove-storage-vm

Actual results:
The LUN used on the initial deployment is still in luns table on the restored DB.
If the new env is going to be deployed on the same LUN, the engine will fail importing the hosted-engine storage domain with
 INFO  [org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommand] (org.ovirt.thread.pool-6-thread-34) [7d2e6cb2] There are existing luns in the system which are part of VG id 

Expected results:
The LUN used by the hosted-engine storage domain is going to be removed as well.

Additional info:
seen on FC, to be verified also on iSCSI

Comment 1 Sandro Bonazzola 2017-10-11 11:12:13 UTC
Should be in oVirt 4.1.7 RC3

Comment 2 Nikolai Sednev 2017-10-18 11:07:09 UTC
Successfully restored engine's db over FC.
More details about reproduction steps available from here: http://pastebin.test.redhat.com/525638.

Moving to verified.

---------------------------After successful initial deployment over FC----------
nsednev-he-5 ~]# sudo -u postgres psql -d engine -c "select * from luns"
could not change directory to "/root"
           physical_volume_id           |      lun_id       |            volume_group_id             |              se
rial              | lun_mapping | vendor_id | product_id | device_size | discard_max_size | discard_zeroes_data
----------------------------------------+-------------------+----------------------------------------+----------------
------------------+-------------+-----------+------------+-------------+------------------+---------------------
 cqJI3t-U5mp-IYZ5-9Gtf-wBWV-SGas-bsm6YO | 3514f0c5a51600f38 | blC01U-dy5m-dV3B-CpWL-4Mk8-OuZX-UJi1mB | SXtremIO_XtremA
pp_XIO00153500071 |           6 | XtremIO   | XtremApp   |          80 |          8388608 | t
(1 row)
--------------------------------------------------------------------------------


---------------------------After successful SHE restor over FC------------------
nsednev-he-5 ~]# sudo -u postgres psql -d engine -c "select * from luns"
could not change directory to "/root"
           physical_volume_id           |      lun_id       |            volume_group_id             |              se
rial              | lun_mapping | vendor_id | product_id | device_size | discard_max_size | discard_zeroes_data
----------------------------------------+-------------------+----------------------------------------+----------------
------------------+-------------+-----------+------------+-------------+------------------+---------------------
 cqJI3t-U5mp-IYZ5-9Gtf-wBWV-SGas-bsm6YO | 3514f0c5a51600f38 | blC01U-dy5m-dV3B-CpWL-4Mk8-OuZX-UJi1mB | SXtremIO_XtremA
pp_XIO00153500071 |           6 | XtremIO   | XtremApp   |          80 |          8388608 | t
(1 row)
--------------------------------------------------------------------------------


Note You need to log in before you can comment on or make changes to this bug.