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.
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:
> 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.
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: