Bug 1309788 - Export VM that was cloned from template as thin copy and with discard snapshot = false should be blocked
Export VM that was cloned from template as thin copy and with discard snapsho...
Status: CLOSED WONTFIX
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
3.6.3.1
Unspecified Unspecified
unspecified Severity medium (vote)
: ovirt-4.0.0-alpha
: ---
Assigned To: Allon Mureinik
Aharon Canan
Storage
: Automation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-18 12:17 EST by Raz Tamir
Modified: 2016-03-31 08:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-28 11:29:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: ovirt‑4.0.0?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


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

  None (edit)
Description Raz Tamir 2016-02-18 12:17:20 EST
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 06:38:00 EST
(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 07:09:35 EST
Yes and see the same behavior
Comment 3 Allon Mureinik 2016-02-21 07:11:26 EST
(In reply to ratamir from comment #2)
> Yes and see the same behavior
Logs please?
Comment 4 Raz Tamir 2016-02-21 08:08:53 EST
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 12:44:40 EDT
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 03:51:30 EDT
(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 06:36:06 EDT
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 08:21:14 EDT
(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.