Bug 1895667

Summary: Missing UI proper error message for cloning a VM which in a process of cloning
Product: [oVirt] ovirt-engine Reporter: Tamir <tamir>
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Tamir <tamir>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.3.10CC: ahadas, bugs, mavital, michal.skrivanek, smelamud
Target Milestone: ovirt-4.4.4   
Target Release: 4.4.4.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.4.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1895665 Environment:
Last Closed: 2020-12-21 12:36:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Added engine log none

Description Tamir 2020-11-08 07:29:56 UTC
Created attachment 1727524 [details]
Added engine log

Description of problem:

After I created a VM and started cloning it and I tried cloning the VM again: After the modal was opened and I filled the new VM name and pressed OK, the operation gets canceled with the error message: "Error while executing action CloneVm: Internal Engine Error".

The operation should be blocked in UI.


Version-Release number of selected component (if applicable):
RHV 4.4.3-13 (ovirt-engine.noarch 4.4.3.10-0.1.el8ev)
RHEL 8.3 x86 hosts and engine.
vdsm.x86_64 4.40.35.1-1.el8ev on the hosts.

How reproducible:
100%

Steps to Reproduce:
1. Create a 4.5 data center and a 4.5 cluster.
2. Install the host and create a new NFS storage domain.
3. Create a VM with a disk and wait for its creation.
4. Clone the VM. 
5. Clone the VM in middle of the previous clone process.

Actual results:
1. The 4.5 data center and the 4.5 cluster were created.
2. The host was installed and the NFS storage domain was created.
3. The VM with the disk was created.
4. The VM was cloned.
5. The VM failed to clone with an error message.

Expected results:
Steps 1-4 are as expected.
5. The VM modal shouldn't open and there should be a proper error message.

Additional info:

Comment 1 Arik 2020-11-09 12:23:26 UTC
(In reply to Tamir from comment #0)
> Expected results:
> Steps 1-4 are as expected.
> 5. The VM modal shouldn't open and there should be a proper error message.

We cannot avoid the dialog from opening but we should take a closer look to see what it actually fails on

Comment 2 Arik 2020-11-12 15:31:34 UTC
We should probably change the locks of clone-VM to lock the VM exclusively and together with the fix for bz 1893540, that will probably solve it

Comment 3 Tamir 2020-12-13 10:01:07 UTC
Verified on RHV 4.4.4-5. All looks good to me.

Env:
  - Engine instance with RHV 4.4.4-5 (ovirt-engine-4.4.4.4-0.9.el8ev) and RHEL 8.3 installed.
  - 2 hosts with RHV 4.4.4-5 and RHEL 8.3, 3 hosts with vdsm-4.40.40-1.el8ev

Steps:

In Admin Portal:

1. Create a 4.5 data center and a 4.5 cluster.
2. Install the host and create a new NFS storage domain.
3. Create a VM with a disk and wait for its creation.
4. Clone the VM. 
5. Clone the VM in middle of the previous clone process.


Results (As Expected):
1. The 4.5 data center and the 4.5 cluster were created.
2. The host was installed and the NFS storage domain was created.
3. The VM with the disk was created.
4. The VM was cloned.
5. The VM failed to clone with the error message: "Cannot add VM. The VM is performing an operation on a Snapshot. Please wait for the operation to finish, and try again."

Comment 4 Sandro Bonazzola 2020-12-21 12:36:40 UTC
This bugzilla is included in oVirt 4.4.4 release, published on December 21st 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.4 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.