sureshanaparti opened a new issue, #6373:
URL: https://github.com/apache/cloudstack/issues/6373
<!--
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.
-->
Root volume is Allocated state after Reinstall/Restore VM, in Stopped state
(VM deployed in local storage pool).
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
VM
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
4.17 RC2
~~~
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
MS: CentOS 7 + Hypervisor: KVM + Storage: NFS, Local
##### SUMMARY
<!-- Explain the problem/feature briefly -->
Reinstall/Restore operation of a Stopped VM (deployed in local storage pool)
succeeded, but the ROOT volume is in Allocated state.
Logs =>
```
2022-05-11 06:05:40,366 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(AsyncJobMgr-Heartbeat-1:ctx-b0e7b96a) (logid:6857341c) Schedule queued job-73
2022-05-11 06:05:40,371 INFO [o.a.c.f.j.i.AsyncJobMonitor]
(Work-Job-Executor-20:ctx-b125231e job-72/job-73) (logid:8520bd75) Add job-73
into job monitoring
2022-05-11 06:05:40,375 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Work-Job-Executor-20:ctx-b125231e job-72/job-73) (logid:b3a63d7c) Executing
AsyncJobVO: {id:73, userId: 2, accountId: 2, instanceType: null, instanceId:
null, cmd: com.cloud.vm.VmWorkRestore, cmdInfo:
rO0ABXNyABpjb20uY2xvdWQudm0uVm1Xb3JrUmVzdG9yZQK3-6IUa1sTAgABTAAKdGVtcGxhdGVJZHQAEExqYXZhL2xhbmcvTG9uZzt4cgATY29tLmNsb3VkLnZtLlZtV29ya5-ZtlbwJWdrAgAESgAJYWNjb3VudElkSgAGdXNlcklkSgAEdm1JZEwAC2hhbmRsZXJOYW1ldAASTGphdmEvbGFuZy9TdHJpbmc7eHAAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAV0ABlWaXJ0dWFsTWFjaGluZU1hbmFnZXJJbXBsc3IADmphdmEubGFuZy5Mb25nO4vkkMyPI98CAAFKAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAAAAAAE,
cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result:
null, initMsid: 32988469395986, completeMsid: null, lastUpdated: null,
lastPolled: null, created: Wed May 11 06:05:38 UTC 2022, removed: null}
2022-05-11 06:05:40,375 DEBUG [c.c.v.VmWorkJobDispatcher]
(Work-Job-Executor-20:ctx-b125231e job-72/job-73) (logid:b3a63d7c) Run VM work
job: com.cloud.vm.VmWorkRestore for VM 5, job origin: 72
2022-05-11 06:05:40,377 DEBUG [c.c.v.VmWorkJobHandlerProxy]
(Work-Job-Executor-20:ctx-b125231e job-72/job-73 ctx-2be6e84e) (logid:b3a63d7c)
Execute VM work job:
com.cloud.vm.VmWorkRestore{"templateId":4,"userId":2,"accountId":2,"vmId":5,"handlerName":"VirtualMachineManagerImpl"}
2022-05-11 06:05:40,378 DEBUG [c.c.v.VirtualMachineManagerImpl]
(Work-Job-Executor-20:ctx-b125231e job-72/job-73 ctx-2be6e84e) (logid:b3a63d7c)
Restoring vm 5 with new templateId 4
...
2022-05-11 06:05:40,444 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Work-Job-Executor-20:ctx-b125231e job-72/job-73) (logid:b3a63d7c) Done
executing com.cloud.vm.VmWorkRestore for job-73
2022-05-11 06:05:40,446 INFO [o.a.c.f.j.i.AsyncJobMonitor]
(Work-Job-Executor-20:ctx-b125231e job-72/job-73) (logid:b3a63d7c) Remove
job-73 from job monitoring
2022-05-11 06:05:40,460 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(API-Job-Executor-49:ctx-2eee8785 job-72 ctx-ad490327) (logid:b3a63d7c)
Complete async job-72, jobStatus: SUCCEEDED, resultCode: 0, result:
org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{"id":"2f6610ac-72ec-4112-9d30-69d2065c8a3a","name":"NewTestLocalVM09","displayname":"NewTestLocalVM01","account":"admin","userid":"7dbb3d96-cf5d-11ec-b370-1e00ba000212","username":"admin","domainid":"64482588-cf5d-11ec-b370-1e00ba000212","domain":"ROOT","created":"2022-05-09T08:08:23+0000","lastupdated":"2022-05-11T05:57:02+0000","state":"Stopped","haenable":"false","zoneid":"67ecf93f-6958-4b19-bad4-4742c67dc093","zonename":"trl-288-k-M7-suresh-anaparti","templateid":"644b8abf-cf5d-11ec-b370-1e00ba000212","templatename":"CentOS
5.5(64-bit) no GUI (KVM)","templatedisplaytext":"CentOS 5.5(64-bit) no GUI
(KVM)","passwordenabled":"false","serviceofferingid":"9ce30249-de75-49f1-92a6-3d6c85532530","serviceofferingname":"L
ocal
Instance","diskofferingid":"fb0c363a-0afd-4ac3-bd56-ae24dcd54313","diskofferingname":"Local","cpunumber":"1","cpuspeed":"500","memory":"512","guestosid":"6473e9a7-cf5d-11ec-b370-1e00ba000212","rootdeviceid":"1","rootdevicetype":"DATADISK","securitygroup":[],"nic":[{"id":"eb6aa947-170f-4d93-88fb-87c415274a8f","networkid":"cdb44e7d-898c-4e90-b36d-feb604a1e050","networkname":"testnw01","netmask":"255.255.255.0","gateway":"10.1.1.1","ipaddress":"10.1.1.139","traffictype":"Guest","type":"Isolated","isdefault":"true","macaddress":"02:00:24:76:00:03","secondaryip":[],"extradhcpoption":[],"deviceid":"0"}],"hypervisor":"KVM","instancename":"i-2-5-VM","details":{"memoryOvercommitRatio":"1.0","Message.ReservedCapacityFreed.Flag":"false","cpuOvercommitRatio":"2.0"},"affinitygroup":[],"displayvm":"true","isdynamicallyscalable":"false","ostypeid":"6473e9a7-cf5d-11ec-b370-1e00ba000212","osdisplayname":"CentOS
5.5
(64-bit)","pooltype":"Filesystem","receivedbytes":"0","sentbytes":"0","tags":[],
"hasannotations":"false","jobid":"b3a63d7c-2536-43ad-b29f-4e229b4ba6de","jobstatus":"0"}
```
DB =>
```
MariaDB [(none)]> SELECT id, uuid, name, instance_id, device_id, pool_id,
size, updated FROM cloud.volumes WHERE instance_id = 5 ORDER BY device_id;
+----+--------------------------------------+-------------+-------------+-----------+---------+------------+---------------------+
| id | uuid | name | instance_id |
device_id | pool_id | size | updated |
+----+--------------------------------------+-------------+-------------+-----------+---------+------------+---------------------+
| 12 | 6e567702-a2e4-4cba-bded-5968cd7c4399 | ROOT-5 | 5 |
0 | NULL | 8589934592 | 2022-05-11 06:05:40 |
| 9 | dfd9ebda-24f1-4e49-b010-5405c19086f2 | LocalDATA01 | 5 |
1 | 2 | 3221225472 | 2022-05-11 05:39:06 |
+----+--------------------------------------+-------------+-------------+-----------+---------+------------+---------------------+
2 rows in set (0.00 sec)
```
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal
test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
- Deploy a VM (with local disk offering)
- Stop, and Reinstall the VM (with same template)
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
Reinstall VM should succeed with all volumes in Ready state. If fails,
should throw relevant error.
##### ACTUAL RESULTS
<!-- What actually happened? -->
Reinstall VM succeeds with Root volume in Allocated state.
--
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]