Bug 1743296 - When having many VMs with the same name - The same VM is selected each time
Summary: When having many VMs with the same name - The same VM is selected each time
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.3.5.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.4.0
: ---
Assignee: Steven Rosenberg
QA Contact: Ivana Saranova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-19 14:44 UTC by David Vaanunu
Modified: 2020-07-29 22:26 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Before this update, selecting templates or virtual machines did not display the proper details when templates or virtual machines with the same name were saved in different Data Centers, because the machine's name, instead of its GUID, was used to fetch the machine's details. With this update, the query uses the virtual machine's GUID, and the correct details are displayed.
Clone Of:
Environment:
Last Closed: 2020-05-20 20:03:12 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+
rbarry: devel_ack+


Attachments (Terms of Use)
Template Video (3.47 MB, video/webm)
2019-08-19 14:44 UTC, David Vaanunu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 104978 0 master MERGED webadmin: Same Name on Different VM Handling 2020-07-29 22:26:16 UTC

Description David Vaanunu 2019-08-19 14:44:08 UTC
Created attachment 1605788 [details]
Template Video

Description of problem:

While having few templates with the same name on diff DCs & clusters
and select a template, diff template is opened.

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

How reproducible:


Steps to Reproduce:
1. Having few templates with the same name on diff clusters and DC
2. select compute --> template
3. Select and open one of the templates
4. Diff template is show


Actual results:

Get other template than chosen

Expected results:

Get the right template

Additional info:


Attached Video

1. Compute --> Template
2. Template name: 'ansible_template_from_vm_basic_population' created on diff 
   clusters & DC
3. Select one of the templates (Example: clusters L0_Group_1)
4. template of cluster 'management' is opened.

Comment 1 Steven Rosenberg 2019-11-11 17:28:27 UTC
I simulated this issue and there is the same problem in the Virtual Machines screen. Tracing the issue, the problem is that we are not fetching the details with the guid which is unique, but with the Name of the Template. One solution may be just to prevent creating Templates and VMs unless they have unique names as we do with importing. This may be a quicker fix, but limits user flexibility. Replacing the mechanism with guid fetching or name, cluster, dc concatenation may take more time and effort.

Comment 2 Martin Tessun 2019-11-13 11:39:07 UTC
(In reply to Steven Rosenberg from comment #1)
> I simulated this issue and there is the same problem in the Virtual Machines
> screen. Tracing the issue, the problem is that we are not fetching the
> details with the guid which is unique, but with the Name of the Template.
> One solution may be just to prevent creating Templates and VMs unless they
> have unique names as we do with importing. This may be a quicker fix, but
> limits user flexibility. Replacing the mechanism with guid fetching or name,
> cluster, dc concatenation may take more time and effort.

I would go with the name fixing. A Template and a VM shouldn't have the same name, as this might also confuse admins.
As such ensuring the uniqueness seems most sensible to me.

Comment 3 Michal Skrivanek 2019-11-25 10:39:04 UTC
(In reply to Martin Tessun from comment #2)
> I would go with the name fixing. A Template and a VM shouldn't have the same
> name, as this might also confuse admins.
> As such ensuring the uniqueness seems most sensible to me.

That's a very limiting choice though. You then easily refuse to e.g. import a VM or create a VM when there is another one elsewhere, where you do not even have permissions to look.
I think this breaks the poor-man's multi-tenancy we have now, and more importantly introduce even worse issues in the workflow for non-Superusers.
I would prefer to fix the behavior instead

Comment 4 Steven Rosenberg 2019-11-27 08:52:17 UTC
Notes to QE: This was a duplicate of another report [1].


Being that the same issue existed for the Virtual Machines List, I changed the title accordingly. Both Template and VM Lists should be tested. 

Also, a fix was added to the snapshot details when cloning a VM, the name was not being validated at the front end level unlike cloning templates from snapshots. This fix was added and should also be tested.

Description for this test:

1. Choose a VM in the VM list.
2. Choose the Snapshots tab.
3. select a snapshot or create one.
4. Enter a VM name that already exists.
5. Press OK.

Expected results: The VM Name's Text Box should have a red perimeter and hovering over the Text Box should give the appropriate error.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1590911

Comment 5 RHV bug bot 2020-01-08 14:49:20 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.4.0' doesn't contain patch 'https://gerrit.ovirt.org/104978']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.4.0

For more info please contact: infra

Comment 6 RHV bug bot 2020-01-08 15:16:53 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.4.0' doesn't contain patch 'https://gerrit.ovirt.org/104978']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.4.0

For more info please contact: infra

Comment 7 RHV bug bot 2020-01-24 19:51:09 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.4.0' doesn't contain patch 'https://gerrit.ovirt.org/104978']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.4.0

For more info please contact: infra

Comment 8 Ivana Saranova 2020-04-02 15:58:30 UTC
Steps:
Scenario 1 (checking the same with VMs in VM list)
1. Having few templates with the same name on diff clusters and DC
2. select compute --> template
3. Select and open one of the templates
4. Check that correct template detail was opened

Scenario 2 (checking the same with creating template from snapshot)
1. Choose a VM in the VM list.
2. Choose the Snapshots tab.
3. select a snapshot or create one.
4. Enter a VM name that already exists.
5. Press OK.

Results scenario 1:
Correct template and VM were opened. (Tried for all the templates and VMs with the same name)

Results scenario 2:
Template with the same name as already existing template could not be created from the snapshot, VM with the same name as the already existing VM could not be cloned from the snapshot.

Verified in:
ovirt-engine-4.4.0-0.29.master.el8ev.noarch

Comment 9 Sandro Bonazzola 2020-05-20 20:03:12 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.