Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1358171

Summary: [RFE] When reattaching a storage domain, template disk copy should register back to the template implicitly
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: RFEsAssignee: Maor <mlipchuk>
Status: CLOSED DUPLICATE QA Contact: Gil Klein <gklein>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.1.1CC: amureini, bugs, eshenitz, mlipchuk, tnisan
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: amureini: ovirt-future?
eshenitz: planning_ack?
eshenitz: devel_ack?
eshenitz: 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: 2016-11-15 00:39:49 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:
Bug Depends On:    
Bug Blocks: 1358291    
Attachments:
Description Flags
Engine and vdsm log none

Description Eyal Shenitzky 2016-07-20 08:44:15 UTC
Created attachment 1181962 [details]
Engine and vdsm log

Description of problem:

Template disk copy doesn't appears in the environment after storage domain detached and attached back.
The user should re-create the disk copy to the attached domain even that the disk already exist on the domain.
  
When reattaching the storage domain, the template disk copy should register back 
to the template implicitly.

Version-Release number of selected component (if applicable):
Engine - 4.0.1.1-0.1.el7ev

How reproducible:
100%

Steps to Reproduce:
1.Create Template from Vm with attached disk
2.Create a copy of the created template disk on another storage domain
3.Create thin copy VM from the created template, choose the storage domain from step 2 for the VM disk.
4.Detach the storage domain from step 2
5.Attach the storage domain from step 2 back to the environment
6.Import the VM from step 3

Actual results:
VM cannot import back because the template disk doesn't exists on the imported 
domain

Expected results:
Template disk should register implicitly.

Additional info:

Comment 3 Allon Mureinik 2016-07-21 12:43:01 UTC
Maor, I recall this behavior is by design, but I don't remember the reason behind it. Can you chime in here?

Comment 4 Maor 2016-11-15 00:39:49 UTC
(In reply to Allon Mureinik from comment #3)
> Maor, I recall this behavior is by design, but I don't remember the reason
> behind it. Can you chime in here?

Indeed, this was already discussed and solved at https://bugzilla.redhat.com/show_bug.cgi?id=1302780#c6
We have decided that once the user will decide to copy the volume to another storage domain, and that domain will contain this disk copy there will be only a DB operation and not a low level copy so the operation will be much faster.
I think that the main reason we didn't want to make it implicitly is that it the same reason we didn't want to register floating disks automatically once the storage domain is being attached (There is also the Quota and profile issues)

Based on https://bugzilla.redhat.com/show_bug.cgi?id=1302780#c6, closing it as duplicate

*** This bug has been marked as a duplicate of bug 1302780 ***