weizhouapache commented on issue #8928:
URL: https://github.com/apache/cloudstack/issues/8928#issuecomment-2060727908

   The issue is caused by multiple records for the templates in 
`template_store_ref` table
   
   ```
   mysql> select 
id,store_id,template_id,created,download_pct,size,download_state,error_str,url,state
 from template_store_ref where template_id=243;
   
+----+----------+-------------+---------------------+--------------+------------+----------------------+----------------------------------------------------+------+----------+
   | id | store_id | template_id | created             | download_pct | size    
   | download_state       | error_str                                          
| url  | state    |
   
+----+----------+-------------+---------------------+--------------+------------+----------------------+----------------------------------------------------+------+----------+
   | 96 |        2 |         243 | 2024-04-17 08:17:49 |          100 | 
5242880000 | DOWNLOADED           | Install completed successfully at 4/17/24, 
8:21 AM | NULL | Creating |
   | 97 |        1 |         243 | 2024-04-17 08:17:49 |          100 |         
 0 | DOWNLOAD_IN_PROGRESS | Download success, starting install                 
| NULL | Creating |
   | 98 |        2 |         243 | 2024-04-17 08:17:49 |          100 | 
5242880000 | DOWNLOADED           | Install completed successfully at 4/17/24, 
8:21 AM | NULL | Ready    |
   | 99 |        1 |         243 | 2024-04-17 08:17:49 |          100 | 
5242880000 | DOWNLOADED           | Install completed successfully at 4/17/24, 
8:19 AM | NULL | Ready    |
   
+----+----------+-------------+---------------------+--------------+------------+----------------------+----------------------------------------------------+------+----------+
   4 rows in set (0.00 sec)
   ```
   
   I will create a draft PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to