Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1534626

Summary: Webadmin-removing a boot iso CD while VM is booting is allowed
Product: [oVirt] ovirt-engine Reporter: Avihai <aefrat>
Component: Frontend.WebAdminAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.2.1CC: aefrat, bugs, lsvaty, lveyde, tnisan, ylavi
Target Milestone: ovirt-4.2.1Keywords: Reopened
Target Release: ---Flags: rule-engine: ovirt-4.2+
pnovotny: testing_plan_complete-
pnovotny: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 11:54:33 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:
Bug Depends On: 1536826    
Bug Blocks:    
Attachments:
Description Flags
engine , vdsm logs none

Description Avihai 2018-01-15 15:43:14 UTC
Created attachment 1381555 [details]
engine , vdsm logs

Description of problem:
Boot a VM from ISO CD (that was previously uploaded), while removing the ISO disk from disks tab -> removal successful & VM boot stops.

Engine log:
2018-01-15 16:19:25,433+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-277369) [97c49b49-3dcc-496b-9329-50023aa8eac9] EVENT_ID: USER_FINISH
ED_REMOVE_DISK(2,014), Disk Fedora-Workstation-netinst-x86_64-26-1.5.iso was successfully removed from domain iscsi_0 (User admin@internal-authz).

Version-Release number of selected component (if applicable):
4.2.1-0.2.el7

How reproducible:
100%

Steps to Reproduce:
1.Upload an ISO disk from localhost
2.Edit a VM so it will boot from the CD with the ISO from step 1
3.Run VM & while its booting goto disks tab & remove the ISO disk

Actual results:
removal successful & VM boot stops. 

Expected results:
removal of ISO disk should be blocked when loaded as a CD boot disk to VM 

Additional info:

Comment 1 Yaniv Kaul 2018-01-15 18:02:38 UTC
I don't see a reason to fix this corner case. Just don't do it. Is there any data loss / corruption that can happen due to this? Is this a realistic scenario?

Comment 2 Avihai 2018-01-16 08:42:12 UTC
(In reply to Yaniv Kaul from comment #1)
> I don't see a reason to fix this corner case. Just don't do it. Is there any
> data loss/corruption that can happen due to this? 
Yes, the boot sequence stops as the CD boot disk is gone during boot.

> Is this a realistic scenario?
Yes, the scenario can occur by mistake/ dumb user so we also have to take those into account .

Comment 3 Yaniv Kaul 2018-01-16 10:28:41 UTC
(In reply to Avihai from comment #2)
> (In reply to Yaniv Kaul from comment #1)
> > I don't see a reason to fix this corner case. Just don't do it. Is there any
> > data loss/corruption that can happen due to this? 
> Yes, the boot sequence stops as the CD boot disk is gone during boot.

But no data is lost?

> 
> > Is this a realistic scenario?
> Yes, the scenario can occur by mistake/ dumb user so we also have to take
> those into account .

I'll close this one as we won't have capacity to handle it. There are so many ways a user can make mistakes - I prefer focusing on more obvious ones.

Comment 4 Yaniv Kaul 2018-01-16 10:29:21 UTC
(In reply to Yaniv Kaul from comment #3)
> (In reply to Avihai from comment #2)
> > (In reply to Yaniv Kaul from comment #1)
> > > I don't see a reason to fix this corner case. Just don't do it. Is there any
> > > data loss/corruption that can happen due to this? 
> > Yes, the boot sequence stops as the CD boot disk is gone during boot.
> 
> But no data is lost?
> 
> > 
> > > Is this a realistic scenario?
> > Yes, the scenario can occur by mistake/ dumb user so we also have to take
> > those into account .
> 
> I'll close this one as we won't have capacity to handle it. There are so
> many ways a user can make mistakes - I prefer focusing on more obvious ones.

But before I fully close it - Tal, do we wish to move used ISO disks to 'locked' state?

Comment 5 Tal Nisan 2018-01-16 11:22:04 UTC
Already had a fix for that in my one of my WIP branches since I stumbled upon this issue a couple of weeks back so I just added a small test and pushed it, I think it's more elegant for the user to know if he is removing an ISO that is attached to a VM and also a template

Comment 10 Pavel Novotny 2018-01-26 16:57:59 UTC
Verified in
ovirt-engine-4.2.1.3-0.1.el7.noarch
ovirt-engine-webadmin-portal-4.2.1.3-0.1.el7.noarch

Following comment 5,
an ISO disk cannot be removed if it is attached to some VM or template,
whether running or not.

In such case, Webadmin raises following error dialog:

"""
Operation Canceled

Error while executing action: Cannot remove Virtual Disk. The disk is an ISO disk attached as CDROM to the following VMs/Templates: run-me.
"""

Comment 12 Sandro Bonazzola 2018-02-12 11:54:33 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

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