[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14180680#comment-14180680
 ] 

Nitin Mehta edited comment on CLOUDSTACK-7771 at 10/22/14 10:33 PM:
--------------------------------------------------------------------

Issue - 
1. User launches a VM from Template and keep it running
2. Admin logins and deleted that template [CloudPlatform does not check 
existing / running VM etc. while the deletion is done]
3. User resets the VM
4. CloudPlatform fails to start the VM as it cannot find the corresponding 
template.
It throws error as
java.lang.RuntimeException: Job failed due to exception Resource [Host:11] is 
unreachable: Host 11: Unable to start instance due to can't find ready 
template: 209 for data center 1
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:113)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:495)


RCA - This was happenning because the template is gone and while creating a 
volume from a template it is assumed that it should be present in CS.


Fix - Throw exception while restoring vm if the template is already deleted.
Some more improvements done as well 
fix the usage event being generated from the right template id and fix the log 
message which sometime showed incorrect template id(when restore was done from 
a new template).


QA notes - test restoring a vm when
the existing template its volume based out if is removed in the zone,
the existing template its volume based out of exists, 
the new template doesnt exist in the zone,
the new template exists in the zone,
try these scenarios with isos,
check usage event and the log message each time


was (Author: nitinme):
Issue - 
1. User launches a VM from Template and keep it running
2. Admin logins and deleted that template [CloudPlatform does not check 
existing / running VM etc. while the deletion is done]
3. User resets the VM
4. CloudPlatform fails to start the VM as it cannot find the corresponding 
template.
It throws error as
java.lang.RuntimeException: Job failed due to exception Resource [Host:11] is 
unreachable: Host 11: Unable to start instance due to can't find ready 
template: 209 for data center 1
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:113)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:495)
RCA - This was happenning because the template is gone and while creating a 
volume from a template it is assumed that it should be present in CS.
Fix - Throw exception while restoring vm if the template is already deleted.
Some more improvements done as well 
fix the usage event being generated from the right template id and fix the log 
message which sometime showed incorrect template id(when restore was done from 
a new template).
QA notes - test restoring a vm when
the existing template its volume based out if is removed in the zone,
the existing template its volume based out of exists, 
the new template doesnt exist in the zone,
the new template exists in the zone,
try these scenarios with isos,
check usage event and the log message each time

> Restore vm shouldnt go through if the template is already deleted
> -----------------------------------------------------------------
>
>                 Key: CLOUDSTACK-7771
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7771
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.5.0
>            Reporter: Nitin Mehta
>            Assignee: Nitin Mehta
>            Priority: Critical
>             Fix For: 4.6.0
>
>
> Restore vm shouldnt go through if the template is already deleted



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to