Bug 1098951 - Possible to create template from vm without disk via REST on cluster without hosts and storage domains
Summary: Possible to create template from vm without disk via REST on cluster without ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Martin Betak
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-19 08:32 UTC by Artyom
Modified: 2016-04-20 01:34 UTC (History)
11 users (show)

Fixed In Version: ovirt-engine-3.5.0_beta
Doc Type: Bug Fix
Doc Text:
Cause: When creating a template from VM, the check whether target cluster lies on same datacenter was only performed for VMs with attached disks. Consequence: It was possible to get to state where neither deletion of the incorrectly created template nor the deletion of target cluster with such template was possible. Fix: The check is now performed for all VMs (even those without disks) Result: It is no more possible to achieve such errorneous state.
Clone Of:
Environment:
Last Closed: 2016-04-20 01:34:47 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 28183 0 master MERGED engine: Disallow cross-DC template creation Never

Description Artyom 2014-05-19 08:32:21 UTC
Description of problem:
It possible to create template from vm without disk via REST on cluster without hosts and storage domains, so now you have interesting situation that you can't remove template without hosts and can't remove cluster with template.
Problem appear via REST, because via UI it just don't show other data center clusters via create template menu.

Version-Release number of selected component (if applicable):
rhevm-3.4.0-0.18.el6ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Have two datacenters, one(dc_1) with host and storagedomain and also with vm without disk, second(dc_2) just with cluster.
2. Create template from vm on dc_1 via REST and give cluster from dc_2:
<template>
    <name>cluster_template</name>
    <vm id="vm_id_from_dc_1"/>
    <cluster id="cluster_id_from_dc2"/>
</template>
3.

Actual results:
Template create successfully. 

Expected results:
Some error message, that say that you chose not correct cluster id(exactly as when you create template from vm with disk)

Additional info:

Comment 1 Allon Mureinik 2014-05-19 10:03:09 UTC
> Create template from vm on dc_1 via REST and give cluster from dc_2
To me this seems like an invalid usecase that should be blocked.
Michal - moving to virt to analyze.

Comment 2 Omer Frenkel 2014-05-20 08:19:48 UTC
right, user shouldn't be able to assign cluster from the wrong DC

Comment 3 Petr Kubica 2014-09-24 14:43:27 UTC
Verified in rhevm 3.5.0-0.12.beta.el6ev


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