Skip to content

Existing Template Settings are deleted when an Update Template api is executed #12456

@kiranchavala

Description

@kiranchavala

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

Image
  1. 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)

  1. Add a uefi setting
Image
  1. 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)

  1. Now Edit/ update the template

Change the root disk controller to scsi

Image
  1. Check the Database and the UI , the uefi setting is lost
Image
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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions