Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template is not Ready if there are multiple zones #8928

Closed
weizhouapache opened this issue Apr 17, 2024 · 4 comments · Fixed by #8933
Closed

Template is not Ready if there are multiple zones #8928

weizhouapache opened this issue Apr 17, 2024 · 4 comments · Fixed by #8933

Comments

@weizhouapache
Copy link
Member

There are two zones in the environment: KVM and VMware

When register a template for all zones, it is stuck at the following status

image

or

image

or

image

ISSUE TYPE
  • Bug Report
COMPONENT NAME
API/storage
CLOUDSTACK VERSION
4.19/4.20
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

@weizhouapache weizhouapache added this to the 4.19.1.0 milestone Apr 17, 2024
@weizhouapache
Copy link
Member Author

weizhouapache commented Apr 17, 2024

The issue is caused by multiple duplicated 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)

once the duplicated records are removed, the template is Ready

mysql> delete from template_store_ref where id=96;
Query OK, 1 row affected (0.00 sec)

mysql> delete from template_store_ref where id=97;
Query OK, 1 row affected (0.00 sec)

image

I will create a draft PR

@shwstppr
Copy link
Contributor

@weizhouapache should we close this as #8933 is merged?

@weizhouapache
Copy link
Member Author

@weizhouapache should we close this as #8933 is merged?

yes @shwstppr

@sureshanaparti
Copy link
Contributor

@weizhouapache Closing this, as advised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants