Bug 1309788 - Export VM that was cloned from template as thin copy and with discard snapshot = false should be blocked
Summary: Export VM that was cloned from template as thin copy and with discard snapsho...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 3.6.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Allon Mureinik
QA Contact: Aharon Canan
URL:
Whiteboard: Storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 17:17 UTC by Raz Tamir
Modified: 2022-07-01 13:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-28 15:29:07 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)
engine and vdsm logs (2.27 MB, application/x-gzip)
2016-02-18 17:17 UTC, Raz Tamir
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-46924 0 None None None 2022-07-01 13:59:04 UTC

Description Raz Tamir 2016-02-18 17:17:20 UTC
Created attachment 1128288 [details]
engine and vdsm logs

Description of problem:
When exporting a vm that was originally cloned as thin copy from template and discard snapshot attribute is set to 'false' should not be allowed because it is impossible to import that template back to the environment:
"Cannot import and collapse VM, Template is missing in domain export_domain".




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


How reproducible:
100%

Steps to Reproduce:
1. Create vm from template as thin copy
2. Export the vm from REST using [1] in 'Additional info' (do not remove the source vm)
3. Try to import the vm

Actual results:


Expected results:


Additional info:

[1]
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <storage_domain>
        <name>export_domain</name>
    </storage_domain>
    <discard_snapshots>false</discard_snapshots>
    <exclusive>false</exclusive>
</action>

Comment 1 Allon Mureinik 2016-02-21 11:38:00 UTC
(In reply to ratamir from comment #0)
> Description of problem:
> When exporting a vm that was originally cloned as thin copy from template
> and discard snapshot attribute is set to 'false' should not be allowed
> because it is impossible to import that template back to the environment:
> "Cannot import and collapse VM, Template is missing in domain export_domain".
Have you attempted to import without collapsing?

Comment 2 Raz Tamir 2016-02-21 12:09:35 UTC
Yes and see the same behavior

Comment 3 Allon Mureinik 2016-02-21 12:11:26 UTC
(In reply to ratamir from comment #2)
> Yes and see the same behavior
Logs please?

Comment 4 Raz Tamir 2016-02-21 13:08:53 UTC
Allon,
Sorry but I thought I was able to do this.
It is impossible to import without collapse snapshot only if I'm removing the source vm before the import

Comment 5 Raz Tamir 2016-03-28 16:44:40 UTC
Hi Allon,
Is there any good reason why not fixing this bug?
In case I'm creating a vm from template and thin copy and export it, I can't import it again.

Comment 6 Allon Mureinik 2016-03-30 07:51:30 UTC
(In reply to ratamir from comment #5)
> Hi Allon,
> Is there any good reason why not fixing this bug?
> In case I'm creating a vm from template and thin copy and export it, I can't
> import it again.

Sure you can - just export and import the template too.

Comment 7 Aharon Canan 2016-03-31 10:36:06 UTC
Or (options from my POV)
1. we can block the option to export thin copy unless the template is already imported
2. give warning message that in order to import the vm we need to export the template and import it first as well.

question- 
what happens in case I want to import to the same domain which already has the template? do I need to export import as well?

Comment 8 Allon Mureinik 2016-03-31 12:21:14 UTC
(In reply to Aharon Canan from comment #7)
> Or (options from my POV)
> 1. we can block the option to export thin copy unless the template is
> already imported
Doesn't make any sense.

> 2. give warning message that in order to import the vm we need to export the
> template and import it first as well.
We don't nanny the user.

> 
> question- 
> what happens in case I want to import to the same domain which already has
> the template? do I need to export import as well?
Don't understand the question - please clarify.


Note You need to log in before you can comment on or make changes to this bug.