soreana opened a new issue, #7139:
URL: https://github.com/apache/cloudstack/issues/7139
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete
the comments.
-->
This issue is almost the same as the #3957
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
Instance reinstallation
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
main,
4.17,
but not in 4.14
~~~
##### SUMMARY
<!-- Explain the problem/feature briefly -->
Reinstall action acts surprisingly. When users reinstall a vm, they expect
the VM configurations stay the same (like: service offering, volume sizes, IP)
and a brand new operating system installs on the VM. But it is not always true.
For example:
###### First Scenario:
1. Deploy an instance. `Don't override the root disk`
2. Resize the root volume
3. Reinstall the VM
| Expected Result | Actual Result |
|-----------------|---------------|
| Root volume size stays the same | Root volume size resets to original
value |
###### First Scenario:
1. Deploy an instance. `Override the root disk`
2. Resize the root volume
3. Reinstall the VM
| Expected Result | Actual Result |
|-----------------|---------------|
| Root volume size stays the same | Root volume size stays the same |
##### Findings
In our debugging we noticed that when user overrides the root disk size an
entry in user_vm_details is created. When user don't override root disk size,
the entry is not created in database. In that case, CloudStack uses the
template's disk size rather than the old root volume size in reinstallation
process.
```
mysql> select * from user_vm_details where name = 'rootdisksize' ;
+----+-------+--------------+-------+---------+
| id | vm_id | name | value | display |
+----+-------+--------------+-------+---------+
| 21 | 5 | rootdisksize | 15 | 1 |
+----+-------+--------------+-------+---------+
1 row in set (0.00 sec)
```
https://github.com/apache/cloudstack/blob/eac357cb77f2ef210ce9c247059e74b9ad75265b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L7746-L7752
--
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]