Bug 1513005

Summary: removing last vNIC by the VM selects the first one left, but selection is not visible
Product: [oVirt] ovirt-engine Reporter: Lucie Leistnerova <lleistne>
Component: Frontend.WebAdminAssignee: Alexander Wels <awels>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: bugs, gshereme
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:00:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
removing vnic
none
removing vnic 2 none

Description Lucie Leistnerova 2017-11-14 15:09:14 UTC
Created attachment 1352020 [details]
removing vnic

Description of problem:
When I remove the last vNIC by the VM, nothing new seems to be selected. But Remove button is active and clicking on it removes the first one in list.

Version-Release number of selected component (if applicable):
ovirt-engine-webadmin-portal-4.2.0-0.0.master.20171113223918.git25568c3.el7.centos.noarch

How reproducible: always


Steps to Reproduce:
1. have VM with Network Interfaces - vnic1, vnic2, vnic3 (displayed in this order)
2. remove vnic3, vnic3 is removed and nothing new selected
3. click on Remove

Actual results: vnic1 is the one to be removed, but is not selected, see attachment


Expected results: Remove button shouldn't be active or the vnic1 should be selected

Comment 1 Alexander Wels 2017-11-16 20:13:22 UTC
Note there is some code that auto selects the first vnic if none are selected. The patch will properly display the selected vnic.

Comment 2 Lucie Leistnerova 2017-11-20 14:49:00 UTC
When last vNIC is removed, first one is selected. But it selects first one and other vNIC at once when other vNIC is removed than the last one.

Steps to reproduce:
1. by the VM create nic2, nic3, nic4, in that order are displayed
2. remove nic3

Result: nic1 and nic4 are selected and will be both deleted, see attachment

tested in 
ovirt-engine-webadmin-portal-4.2.0-0.0.master.20171119135709.git6d448d3.el7.centos.noarch

Comment 3 Lucie Leistnerova 2017-11-20 14:49:32 UTC
Created attachment 1355882 [details]
removing vnic 2

Comment 4 Lucie Leistnerova 2017-12-07 10:59:08 UTC
Now is always only one interface selected

verified in ovirt-engine-webadmin-portal-4.2.0-0.6.el7.noarch

Comment 5 Sandro Bonazzola 2017-12-20 11:00:49 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

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