Bug 1431535 - [UI] - Add exclamation mark/tooltip warning 'VM Name already exist in the Data Center' on registering a VM from a DATA domain dialog and option to rename it
Summary: [UI] - Add exclamation mark/tooltip warning 'VM Name already exist in the Dat...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.1.1.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.4.0
: ---
Assignee: shani
QA Contact: Daniel
URL:
Whiteboard:
Depends On: 954321
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-13 07:45 UTC by Michael Burman
Modified: 2020-05-20 20:00 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-05-20 20:00:32 UTC
oVirt Team: Storage
Embargoed:
aoconnor: ovirt-4.4+


Attachments (Terms of Use)
screenshot - import from export domain (102.09 KB, image/png)
2017-03-13 07:45 UTC, Michael Burman
no flags Details
records- import from data domain behaviour (6.32 MB, application/x-gzip)
2017-03-13 07:49 UTC, Michael Burman
no flags Details
Verified duplicated vm name upon import (98.43 KB, image/png)
2020-04-05 14:40 UTC, Ilan Zuckerman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 107091 0 master MERGED webadmin: avoid importing a VM with an existing name 2020-07-06 14:56:32 UTC

Description Michael Burman 2017-03-13 07:45:10 UTC
Created attachment 1262317 [details]
screenshot - import from export domain

Description of problem:
[UI] - Add exclamation mark/tooltip warning 'VM Name already exist in the Data Center' on Import VM from data domain dialog and option to rename it. 

- When importing VM from export domain and we have a VM with a name that already exist in the DC, we have a nice exclamation mark icon and a tooltip warning me that the VM's name is already in use and i need to change it in order to import the VM.

But, when importing VM from data domain, for the same case, i don't have any warning/tooltip/exclamation mark warning me about the VM's name that is in use in the DC and engine allows me to press 'OK' to approve operation, but then i'm failing with error:
"Import VM failed - VM Name already exist in the Data Center. Please rename the VM in the Data Center first"

- The behaviour should be the same, and for import VM from data domain, i should get a nice exclamation mark icon and a tooltip warning me about VM name is in use and that i need to change/rename it on DC. I shouldn't be allowed to press 'OK' to approve operation in such case.
- I should be able to rename the VMs name with unique name, like we have in import VM from export domain and it should be allowed. Today i can rename the name, but nothing happens, i'm still failing with same error. 

Version-Release number of selected component (if applicable):
4.1.1.4-0.1.el7

How reproducible:
100

Steps to Reproduce:
1. Import VM from data domain (VM name already in use in DC)
2. Import VM from export domain (VM name already in use in DC)

Actual results:
1. NO warning about VM name already exist in the DC. allowed to approve operation and then failing with error.
2. Nice exclamation mark icon and a tooltip warning that VM name already exist in the DC. Not allowed to approve operation.

Expected results:
- exclamation mark icon and a tooltip warning me about VM name is in use for import VM from data domain dialog as well. 
- Add an option to rename the VMs name before import and allow it. Just like on the import VM from export domain dialog. 

Note, that currently when renaming the VM's name in the import VM from data domain dialog, we still failing to import VM with the same error:

"Import VM failed - VM Name already exist in the Data Center. Please rename the VM in the Data Center first"

Comment 1 Michael Burman 2017-03-13 07:49:44 UTC
Created attachment 1262318 [details]
records- import from data domain behaviour

Comment 3 Sandro Bonazzola 2019-01-28 09:36:34 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.

Comment 4 Tal Nisan 2019-10-07 03:22:36 UTC
Benny, might be a good idea to add it after we move to the new export to data domain

Comment 5 shani 2020-01-30 14:33:36 UTC
Trying to reproduce the bug on master - 4.4:

1. Using the new Export dialog and trying to import the VM with the already exists name, resulted only with an error on the engine lo, after the operation executed and failed:
ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-5) [] Operation Failed: [Cannot add VM. The VM name is already in use, please choose a unique name and try again.]

Therefore, the issue still needs to be fixed (adding an exclamation mark before allowing the operation to be executed).

2. After changing the VM's name on the import VMs dialog, the VM is imported successfully,
Although trying to rename the imported VM's name to a name that already exists (but different than the original VM's name) resulted with an error on the UI:
Import VM failed - VM Name already exist in the Data Center. Please rename the VM in the Data Center first 

I'll start working on it.

Comment 8 shani 2020-02-24 15:15:01 UTC
steps to reproduce:
1. Have an SD with a VM (or more) on it.
2. Detach that SD (maintenance > detach).
3. Create another VM on a different SD but with the same name as the VM from #1. 
4. Attach that SD back (now you should have a 'VM import' tab on that SD).
5. Choose the VM with the duplicated name for importing.

The operation should be blocked on the UI, so unless a unique name was specified, the operation shouldn't continue.

Comment 9 Ilan Zuckerman 2020-04-05 14:39:32 UTC
Verified on 4.4.0-0.29.master.el8ev

According Shani's steps from cooment #8, the UI is preventing from user to import a VM with the same name that already exist on some other SD.
See image attached.

Comment 10 Ilan Zuckerman 2020-04-05 14:40:10 UTC
Created attachment 1676410 [details]
Verified duplicated vm name upon import

Comment 11 Sandro Bonazzola 2020-05-20 20:00:32 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

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


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