Bug 1391463

Summary: VM's disk removal is not logged in VM's Events subtab
Product: [oVirt] ovirt-engine Reporter: Jiri Belka <jbelka>
Component: Frontend.WebAdminAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.0.5.5CC: bugs, tnisan
Target Milestone: ovirt-4.1.0-betaKeywords: Reopened
Target Release: 4.1.0.2Flags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
ratamir: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:49:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Belka 2016-11-03 11:27:20 UTC
Description of problem:

When one removes a disk from a VM the event is not logged into the VM Events subtab. Pretty odd, problematic to understand history actions on such VM.

~~~
...
 The disk fff_Disk1 was successfully added to VM fff.
 Add-Disk operation of fff_Disk1 was initiated on VM fff by admin@internal-authz.
 Disk fff_Disk1 was successfully removed from domain jb-rhevm40 (User user1.com.com).
(2631 rows)
~~~

There must be obviously missing some "glue" between this disk and the VM.

Version-Release number of selected component (if applicable):
ovirt-engine-backend-4.0.5.5-0.1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Have a VM with a disk, not running
2. remove the disk from VM's Disk subtab -> Remove
3. monitor Events subtab

Actual results:
missing any info about VM's disk removal

Expected results:
should be there, it does make sense

Additional info:

Comment 1 Jiri Belka 2016-11-03 11:28:04 UTC
applies to User Portal as well, it was in fact discovered there

Comment 3 Tal Nisan 2016-11-06 08:23:50 UTC
This behavior is intentional since the problem in this case is that a disk can be attached to multiple VMs at the same time, so it doesn't make much sense to log all the VMs it is attached to at the time of deletion.
On the other hand logging only the VM from the deletion "content" (i.e. if we are deleting from a specific VM disks tab) doesn't make much sense as it gives partial data.

Comment 4 Tal Nisan 2016-11-17 12:24:11 UTC
After an offline discussion with QE it has been decided that if the disk was attached to VMs at the time of removal the event log will be changed to something similar to:

Disk ${DiskAlias} associated to VMs ${VmNames} was successfully removed from domain ${StorageDomainName}”

Comment 5 Raz Tamir 2017-01-22 16:53:20 UTC
Verified on ovirt-engine-4.1.0.3-0.0.master.20170122091652.gitc6fc2c2.el7.centos

Remove a Disk from VM's disks sub tab and in the event log:

Disk golden_env_mixed_virtio_3_1_Disk1 associated to the VMs golden_env_mixed_virtio_3_1 was successfully removed from domain iscsi_0