kiranchavala opened a new issue, #12456:
URL: https://github.com/apache/cloudstack/issues/12456

   ### problem
   
   Existing Template Settings are deleted when an Update Template api is 
executed
   
   ### versions
   
   ACS 4.22 
   
   ### The steps to reproduce the bug
   
   1. Register a template in Cloudstack
   
   2. Navigate to Images > Tempaltes> Settings
   
    Make sure only the template has the  rootDiskController setting to osdefault
   
   <img width="1585" height="309" alt="Image" 
src="https://github.com/user-attachments/assets/5a03c20a-1bc7-4093-bd59-040edf87e755";
 />
   
   3. 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)
   
   ```
   
   4. Add a uefi setting 
   
   
   <img width="1568" height="379" alt="Image" 
src="https://github.com/user-attachments/assets/fdf445d2-bcea-49aa-9af6-bba171d5606d";
 />
   
   5. 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)
   
   ```
   
   6. Now Edit/ update the template
   
   Change the root disk controller to scsi
   
   
   <img width="1557" height="445" alt="Image" 
src="https://github.com/user-attachments/assets/203bd687-2009-448d-ad09-b504d7a2ab30";
 />
   
   
   7.  Check the Database and the UI , the uefi setting is lost
   
   <img width="1582" height="309" alt="Image" 
src="https://github.com/user-attachments/assets/10a957da-5497-45b2-8092-59c7acf32c54";
 />
   
   ```
   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


-- 
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