Bug 2037779 - VM name is displayed as <UNKNOWN> in disk properties update notification
Summary: VM name is displayed as <UNKNOWN> in disk properties update notification
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.4.9.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: Pavel Bar
QA Contact: Ilia Markelov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-06 14:58 UTC by Yury.Panchenko
Modified: 2022-04-20 06:33 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-4.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-20 06:33:59 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.5?


Attachments (Terms of Use)
Screenshot of the operation's notification (9.78 KB, image/png)
2022-03-08 12:23 UTC, Pavel Bar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 131 0 None Merged Fixing the issue with VM name shown as <UNKNOWN> in disk properties update notification 2022-03-13 11:19:41 UTC
Red Hat Issue Tracker RHV-44437 0 None None None 2022-01-06 15:08:42 UTC

Description Yury.Panchenko 2022-01-06 14:58:14 UTC
Description of problem:
When user updates a vm disk properties, he sees UI notification with incorrect vm name.
 
Finished Updating Disk DISKNAME properties for VM <UNKNOWN>

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

How reproducible:
always

Steps to Reproduce:
1.Take a vm
2.Modify any vm disk property
3.Save changes

Actual results:
Ui notification
Finished Updating Disk DISKNAME properties for VM <UNKNOWN>

Expected results:
Ui notification
Finished Updating Disk DISKNAME properties for VM VMNAME

Comment 1 Sharon Gratch 2022-01-12 12:54:58 UTC
This seems to me like an easy fix, need to add the vm name ('VM' key) to job properties: 
https://github.com/oVirt/ovirt-engine/blob/6dd6c9a7288bb5b65204fb7d7a5a429f4e676cd2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AbstractDiskVmCommand.java#L234

But since it's a storage backend code, re-assigning it to storage team for fixing.

Comment 2 Pavel Bar 2022-03-08 12:23:36 UTC
Created attachment 1864595 [details]
Screenshot of the operation's notification

Comment 3 Pavel Bar 2022-03-08 12:52:47 UTC
While working on scratch disks' RFE I encountered this issue, but from another flow:
While updating disk's properties from 'Storage' --> 'Disks' UI menu, you receive this buggy notification:
"finished updating disk DISKNAME properties for VM <UNKNOWN>".
See the attached screenshot.
I came to open a new bug, and the smart "auto complete" pointed me to this existing bug :)
It's important to note the above scenario, because in this flow some disks might not be attached to any VM (vs. a case that Yury reported where the disk's update happens from below the VM menu, thus the disk is definitely attached to the VM).
In both cases - disks attached to a VM or not - you receive the same "VM <UNKNOWN>".
So the solution should also take this into account and I suggest to print "N/A" when the disk is not attached to any VM.
Also the disk might be attached to *several* VMs (in the "UpdateDiskCommand" code there is a 'List' of attached VMs), so the right solution should also (1) Display all the VMs & (2) probably change also the message "Updating Disk ${DiskAlias} properties for VM ${VM}" to state "VMs" (plural) vs. the current "VM" (single).
Since this issue was reported by Veeam and the solution is simple and I already fixed it and tested it, I'm going to create a new PR now, push the tested fix, so it will be ready to be merged to any version according to Product Managers' decision.
The fix AFAIU is not in
https://github.com/oVirt/ovirt-engine/blob/6dd6c9a7288bb5b65204fb7d7a5a429f4e676cd2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AbstractDiskVmCommand.java#L234
as Sharon suggested, but (in order to handle the additional scenario that I described) is in 
https://github.com/oVirt/ovirt-engine/blob/6dd6c9a7288bb5b65204fb7d7a5a429f4e676cd2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/UpdateDiskCommand.java#L786

Comment 4 Pavel Bar 2022-03-09 10:41:43 UTC
Testing instructions - update disk's properties (i.e., change an alias or description).
Test the following matrix:
1) Disks:
  a. Shared between VMs.
  b. Not shared between VMs.
  c. Attached to VM.
  d. Not attached to VM.
2) Disk's properties update happens from:
  a. Below the VM menu: "Compute" --> "Virtual Machines" --> VMNAME --> "Disks" tab.
  b. General UI menu: "Storage" --> "Disks" .


Those are the examples of the expected result messages:
Finished Updating Disk Disk5 properties for VMs: N/A
Finished Updating Disk VM1_Disk1 properties for VMs: VM1
Finished Updating Disk VM1_And_VM2_Disk1 properties for VMs: VM1, VM2

Comment 7 Ilia Markelov 2022-03-24 15:00:59 UTC
Verified

Succeeded to get all the expected results by following the latest testing matrix.

Version 4.5.0.1-601.f26e9ea8cac5.3.el8ev

vdsm-4.50.0.10-1.el8ev.x86_64

Comment 8 Sandro Bonazzola 2022-04-20 06:33:59 UTC
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022.

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