-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Open
Copy link
Description
problem
Existing Template Settings are deleted when an Update Template api is executed
versions
ACS 4.22
The steps to reproduce the bug
-
Register a template in Cloudstack
-
Navigate to Images > Tempaltes> Settings
Make sure only the template has the rootDiskController setting to osdefault
- Verify the database
mysql> select * from vm_template_details where template_id=215;
+----+-------------+--------------------+-----------+---------+
| id | template_id | name | value | display |
+----+-------------+--------------------+-----------+---------+
| 41 | 215 | rootDiskController | osdefault | 1 |
+----+-------------+--------------------+-----------+---------+
1 row in set (0.00 sec)
- Add a uefi setting
- Verify the database
mysql> select * from vm_template_details where template_id=215;
+----+-------------+--------------------+-----------+---------+
| id | template_id | name | value | display |
+----+-------------+--------------------+-----------+---------+
| 42 | 215 | UEFI | SECURE | 1 |
| 43 | 215 | rootDiskController | osdefault | 1 |
+----+-------------+--------------------+-----------+---------+
2 rows in set (0.00 sec)
- Now Edit/ update the template
Change the root disk controller to scsi
- Check the Database and the UI , the uefi setting is lost
mysql> select * from vm_template_details where template_id=215;
+----+-------------+--------------------+-------+---------+
| id | template_id | name | value | display |
+----+-------------+--------------------+-------+---------+
| 44 | 215 | rootDiskController | scsi | 1 |
+----+-------------+--------------------+-------+---------+
1 row in set (0.00 sec)
What to do about it?
The existing template settings should not be deleted when the edit/update template is peformed