Bug 1828089

Summary: Import data domain from previous RHV version fails
Product: [oVirt] ovirt-engine Reporter: Tamir <tamir>
Component: GeneralAssignee: Ahmad Khiet <akhiet>
Status: CLOSED CURRENTRELEASE QA Contact: Tamir <tamir>
Severity: high Docs Contact:
Priority: high    
Version: 4.4.0CC: arusakov, bugs, michal.skrivanek, mtessun, tnisan
Target Milestone: ovirt-4.4.2Flags: pm-rhel: ovirt-4.4+
mtessun: planning_ack+
Target Release: 4.4.2.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-18 07:12:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1740978    

Description Tamir 2020-04-26 19:07:15 UTC
Created attachment 1681964 [details]
Added logs and GIF

Description of problem:
When trying to import a data domain (v4 or before) to 4.4 (v5 storage) then when agreeing to upgrade the data domain version there is a stuck loading screen and javascript error in the console. The data domain is never added.

I think it's connected to the data domain version upgrade. I tried to import data domain with the same version (V5) and it was imported successfully. 

Also I tried to import the data domain from another env and from the same env both with the same cluster version (4.2) to (4.4).


Version-Release number of selected component (if applicable):
RHV 4.4.0-31 and RHEL 8.2 (Engine and Host)

How reproducible:
100%

Steps to Reproduce:
1. Add a host, create a data center with compatibility version 4.2, cluster with the same compatibility version, add 2 data domains and create a VM with disc in one storage domain. 
2. create a data center with compatibility version 4.4, cluster with the same compatibility version.
3. Move the data center with compatibility version 4.2 to maintenance and detach the data domain with the VM.  
4. Move the host to maintenance, edit the cluster to the one with compatibility version 4.4 and activate the host.
5. Remove the data domain we detached.
6. Import the data domain we removed right now to the data center with compatibility version 4.4.
7. Accept upgrading the storage domain version.

Actual results:
Everything works until I get to step 7. In step 7 after accepting the upgrade, we get to infinitely loading screen and a javascript error in the console.

Expected results:
The storage domain is imported and upgraded to version v5.

Additional info:

Comment 1 Ahmad Khiet 2020-07-27 18:59:28 UTC
a fix has been posted for this issue. 
the root cause for this bug is clearing the domain to add list.
now, the UI error will not appear and the import will succeed. 


if before applying this fix, the steps for importing and upgrading has been failed (UI, and import failure), try to add the storage domain for another time, if there's a failure with a message "Failed to retrieve existing storage domain information." then, please remove the storage domain connection from the DB manullay from the table "storage_server_connections".

Comment 2 shani 2020-08-03 14:34:25 UTC
*** Bug 1861812 has been marked as a duplicate of this bug. ***

Comment 3 Tamir 2020-08-09 18:15:09 UTC
Verified on RHV 4.4.2-2 (ovirt-engine 4.4.2.1-0.15.el8ev) and everything works. Thanks

Env:
  - Engine instance with RHV 4.4.2-2 and RHEL 8.2.1 installed.
  - Host with RHV 4.4.2-2 and RHEL 8.2.1 and host with RHV 4.2 and RHEL 7.6 installed.

Steps:

1. Add a host with RHV 4.2, create a data center with compatibility version 4.2, cluster with the same compatibility version, add 2 data domains and create a VM with disc in one storage domain. 
2. Add a host with RHV 4.4, create a data center with compatibility version 4.4, cluster with the same compatibility version.
3. Move the data center with compatibility version 4.2 to maintenance and detach the data domain with the VM.  
4. Remove the data domain we detached.
5. Import the data domain we removed right now to the data center with compatibility version 4.4.
6. Accept upgrading the storage domain version.

Results (As Expected):

1. Added the host and created the data center, cluster, 2 data domains and a VM.
2. Added a host, created a data center and a cluster.
3. The data center moved to maintenance and the domain was detached.
4. The data domain doesn't exist on the RHVM.
5. The update modal opened.
6. The update modal closed, the data domain was imported and it's version was upgraded.

Comment 4 Sandro Bonazzola 2020-09-18 07:12:04 UTC
This bugzilla is included in oVirt 4.4.2 release, published on September 17th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.