-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Milestone
Description
ISSUE TYPE
- Bug
COMPONENT NAME
Component: templates
CLOUDSTACK VERSION
Cloudstack version 4.19
SUMMARY
Unable to deploy a vm from a direct download templates
Steps to reproduce the issue
- Register a template mark it as Direct download
-
Launch a vm with the Direct download template
-
The VM deployment fails with the exception
2023-10-04 06:59:12,162 ERROR [c.c.a.ApiServer] (qtp1239807799-18:ctx-b094b367 ctx-5a43f68f) (logid:a339ed30) unhandled exception executing api command: [Ljava.lang.String;@71c9d354
com.cloud.utils.exception.CloudRuntimeException: Template 205 has not been completely downloaded to zone 1
at com.cloud.template.TemplateManagerImpl.getTemplateSize(TemplateManagerImpl.java:2020)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
In the database, the following entries could be causing the issue
MariaDB [cloud]> select * from template_store_ref where template_id=205 \G;
*************************** 1. row ***************************
id: 21
store_id: NULL
template_id: 205
created: 2023-10-04 06:30:37
last_updated: NULL
job_id: NULL
download_pct: 0
size: 0
store_role: Image
physical_size: 0
download_state: BYPASSED
error_str: NULL
local_path: NULL
install_path: NULL
url: NULL
state: Ready
destroyed: 0
is_copy: 0
update_count: 0
ref_cnt: 0
updated: NULL
download_url_created: NULL
download_url: NULL
Expected behavior
The vm deployment should succeed
Actual behavior
The vm deployment is failing
