Bug 975040

Summary: engine [TEXT]: unclear error when trying to remove a disk from a template when the template disk has only one copy on that specific domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acanan, acathrow, amureini, iheim, jkt, lpeer, Rhev-m-bugs, scohen, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.4.0_av2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-12 14:06:07 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:    
Bug Blocks: 1078909, 1142926    
Attachments:
Description Flags
log none

Description Dafna Ron 2013-06-17 13:32:47 UTC
Created attachment 762026 [details]
log

Description of problem:

under the domains tab -> select the domain -> disks subtab -> we are able to select a template disk located under the domain and try to remove it. 

the error given to the user is this: 

Template's Image is located only on single domain.

this is informational but not really clear on why the operation in not allowed or what the user needs to do to solve it (i.e, we cannot remove a template disk but only copies, to remove a disk we need to remove the entire template. 


2013-06-17 16:27:30,592 WARN  [org.ovirt.engine.core.bll.RemoveDiskCommand] (ajp-/127.0.0.1:8702-2) CanDoAction of action RemoveDisk failed. Reasons:VAR__ACTION__REMOVE,VAR__TYPE__VM_DISK,VM_TEMPLATE_IMAGE_LAST_DOMAIN

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

sf18

How reproducible:

100%

Steps to Reproduce:
1. create a template 
2. in storage tab -> select the storage -> disks
3. try to remove the template disk

Actual results:

we fail to remove the template with the following error: 

Template's Image is located only on single domain.

Expected results:

the error should be more informational. 
** the template disk cannot be removed from the template button because the remove tab is greyed out but the button under the storage tab is not ***

Additional info: log

Comment 2 Tal Nisan 2014-02-09 16:42:18 UTC
Changed the behavior of the remove button in the storage disks sub tab to fit the behavior of the remove button in the disks main tab, it will be grayed out for template disks, also the error message was rephrased to a clearer message in case the operation fails through the APIs

Comment 3 Leonid Natapov 2014-03-09 15:18:09 UTC
3.4.0-0.3.master.el6ev
Error while executing action: Cannot remove Virtual Machine Disk. The image is the only remaining copy of a Template disk.

Comment 4 Itamar Heim 2014-06-12 14:06:07 UTC
Closing as part of 3.4.0