-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: fix attach uploaded volume #10267
Conversation
Fixes apache#10120 When an uploaded volume is attached to a VM for which no existing volume can be found it was resulting in error. For such volumes, server needs to find a suitable pool first and copy them to the pool from secondary store. Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10267 +/- ##
============================================
+ Coverage 15.14% 15.15% +0.01%
- Complexity 11282 11298 +16
============================================
Files 5408 5408
Lines 473823 473854 +31
Branches 57826 57829 +3
============================================
+ Hits 71763 71822 +59
+ Misses 394038 394004 -34
- Partials 8022 8028 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12201 |
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm. didn't test.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12220 |
@blueorangutan test |
@borisstoyanov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested manually
- Launch 2 Cloudstack instances (vm1 and vm2) with only root disk in the same admin account.
- Stop the instances (vm1 and vm2) and detach the root disk associated with the vm's (vm1 and vm2)
- Download the root disk of vm1 to you local desktop
- Upload the root disk of vm1 to the admin account. The state of the volume will be in Uploaded state
- Attach the uploaded root disk of vm 1 to vm 2(Make sure to attach it as device id 0)
- Uploaded volume attached successfully
Logs
[root@ol8 ~]# cat /var/log/cloudstack/management/management-server.log |grep -i "logid:9fb8dbf5"
2025-01-29 10:28:59,213 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73) (logid:9fb8dbf5) Executing AsyncJobVO: {id:73, userId: 2, accountId: 2, instanceType: Volume, instanceId: 10, cmd: org.apache.cloudstack.api.command.admin.volume.AttachVolumeCmdByAdmin, cmdInfo: {"virtualmachineid":"b3813c2b-fc56-401c-9457-edafc3a51e1d","response":"json","ctxUserId":"2","sessionkey":"4hxZIoJxZKkVjp98geXPBIe1KQI","httpmethod":"GET","ctxStartEventId":"174","id":"4bd368f6-d381-4e92-9f59-b8aba2f28b94","ctxDetails":"{\"interface com.cloud.vm.VirtualMachine\":\"b3813c2b-fc56-401c-9457-edafc3a51e1d\",\"interface com.cloud.storage.Volume\":\"4bd368f6-d381-4e92-9f59-b8aba2f28b94\"}","deviceid":"0","ctxAccountId":"2","uuid":"4bd368f6-d381-4e92-9f59-b8aba2f28b94","cmdEventType":"VOLUME.ATTACH"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 32985835373148, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
2025-01-29 10:28:59,220 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Account [5779e275-de18-11ef-96b3-1e001d00025c] has access to resource.
2025-01-29 10:28:59,235 INFO [c.c.s.VolumeApiServiceImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Trying to attach volume [test7/4bd368f6-d381-4e92-9f59-b8aba2f28b94] to VM instance [i-2-6-VM/b3813c2b-fc56-401c-9457-edafc3a51e1d], update async job-73 progress status
2025-01-29 10:28:59,236 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Update async-job attachment, job-73, instanceType: Volume, instanceId: 10
2025-01-29 10:28:59,245 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Sync job-74 execution on object VmWorkJobQueue.6
2025-01-29 10:28:59,252 DEBUG [c.c.s.VolumeApiServiceImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) New job 74, result field: null
2025-01-29 10:29:00,336 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74) (logid:9fb8dbf5) Executing AsyncJobVO: {id:74, userId: 2, accountId: 2, instanceType: null, instanceId: null, cmd: com.cloud.vm.VmWorkAttachVolume, cmdInfo: rO0ABXNyAB9jb20uY2xvdWQudm0uVm1Xb3JrQXR0YWNoVm9sdW1lB62v-WGH4hwCAAJMAAhkZXZpY2VJZHQAEExqYXZhL2xhbmcvTG9uZztMAAh2b2x1bWVJZHEAfgABeHIAE2NvbS5jbG91ZC52bS5WbVdvcmufmbZW8CVnawIABEoACWFjY291bnRJZEoABnVzZXJJZEoABHZtSWRMAAtoYW5kbGVyTmFtZXQAEkxqYXZhL2xhbmcvU3RyaW5nO3hwAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAAGdAAUVm9sdW1lQXBpU2VydmljZUltcGxzcgAOamF2YS5sYW5nLkxvbmc7i-SQzI8j3wIAAUoABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAAAAAABzcQB-AAYAAAAAAAAACg, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 32985835373148, completeMsid: null, lastUpdated: null, lastPolled: null, created: Wed Jan 29 10:28:59 UTC 2025, removed: null}
2025-01-29 10:29:00,336 DEBUG [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74) (logid:9fb8dbf5) Run VM work job: com.cloud.vm.VmWorkAttachVolume for VM 6, job origin: 73
2025-01-29 10:29:00,341 DEBUG [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Execute VM work job: com.cloud.vm.VmWorkAttachVolume{"volumeId":10,"deviceId":0,"userId":2,"accountId":2,"vmId":6,"handlerName":"VolumeApiServiceImpl"}
2025-01-29 10:29:00,350 DEBUG [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) host id is null, using last host id 1
2025-01-29 10:29:00,353 DEBUG [o.a.c.s.a.LocalStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) LocalStoragePoolAllocator is returning null since the disk profile does not use local storage and bypassStorageTypeCheck is false.
2025-01-29 10:29:00,353 DEBUG [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Could not find any available Storage Pool using Storage Pool Allocator [LocalStoragePoolAllocator].
2025-01-29 10:29:00,353 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Looking for pools in dc [1], pod [1] and cluster [1]. Disabled pools will be ignored.
2025-01-29 10:29:00,357 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found pools [[Pool[1|NetworkFilesystem], Pool[2|NetworkFilesystem]]] that match with tags [[]].
2025-01-29 10:29:00,359 DEBUG [o.a.c.s.a.AbstractStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking if storage pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1","uuid":"32c3afb6-22db-3a73-ae6a-44d59bbfb70e"}] is suitable to disk [DskChr[DATADISK|1073741824|]].
2025-01-29 10:29:00,361 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Volume [Vol[10|name=test7|vm=null|DATADISK]] is not allocated to any pool. Cannot check compatibility with pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1","uuid":"32c3afb6-22db-3a73-ae6a-44d59bbfb70e"}].
2025-01-29 10:29:00,361 INFO [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1 (1) does not supply IOPS capacity, assuming enough capacity
2025-01-29 10:29:00,362 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool 1 for storage, totalSize: 2197949513728, usedBytes: 1553425498112, usedPct: 0.7067612283219346, disable threshold: 0.95
2025-01-29 10:29:00,362 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Destination pool id: 1
2025-01-29 10:29:00,368 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Pool ID for the volume with ID 10 is null
2025-01-29 10:29:00,372 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1 of type NetworkFilesystem with overprovisioning factor 2
2025-01-29 10:29:00,372 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total over provisioned capacity calculated is 2 * (1.9990 TB) 2197949513728
2025-01-29 10:29:00,372 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total capacity of the pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1 with ID 1 is (3.9980 TB) 4395899027456
2025-01-29 10:29:00,373 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool: 1 for storage allocation , maxSize : (3.9980 TB) 4395899027456, totalAllocatedSize : (17.77 GB) 19076088016, askingSize : (1.00 GB) 1073741824, allocated disable threshold: 0.95
2025-01-29 10:29:00,373 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found suitable local storage pool [Pool[1|NetworkFilesystem]] to allocate disk [DskChr[DATADISK|1073741824|]] to it, adding to list.
2025-01-29 10:29:00,373 DEBUG [o.a.c.s.a.AbstractStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking if storage pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765"}] is suitable to disk [DskChr[DATADISK|1073741824|]].
2025-01-29 10:29:00,375 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Volume [Vol[10|name=test7|vm=null|DATADISK]] is not allocated to any pool. Cannot check compatibility with pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765"}].
2025-01-29 10:29:00,375 INFO [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2 (2) does not supply IOPS capacity, assuming enough capacity
2025-01-29 10:29:00,376 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool 2 for storage, totalSize: 2197949513728, usedBytes: 1553425498112, usedPct: 0.7067612283219346, disable threshold: 0.95
2025-01-29 10:29:00,376 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Destination pool id: 2
2025-01-29 10:29:00,382 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Pool ID for the volume with ID 10 is null
2025-01-29 10:29:00,385 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2 of type NetworkFilesystem with overprovisioning factor 2
2025-01-29 10:29:00,385 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total over provisioned capacity calculated is 2 * (1.9990 TB) 2197949513728
2025-01-29 10:29:00,385 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total capacity of the pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2 with ID 2 is (3.9980 TB) 4395899027456
2025-01-29 10:29:00,386 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool: 2 for storage allocation , maxSize : (3.9980 TB) 4395899027456, totalAllocatedSize : (12.88 GB) 13833208016, askingSize : (1.00 GB) 1073741824, allocated disable threshold: 0.95
2025-01-29 10:29:00,386 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found suitable local storage pool [Pool[2|NetworkFilesystem]] to allocate disk [DskChr[DATADISK|1073741824|]] to it, adding to list.
2025-01-29 10:29:00,386 DEBUG [o.a.c.s.a.AbstractStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) ClusterScopeStoragePoolAllocator is returning [2] suitable storage pools [[{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1","uuid":"32c3afb6-22db-3a73-ae6a-44d59bbfb70e"}, {"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765"}]].
2025-01-29 10:29:00,389 DEBUG [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) VM [VM instance {"id":6,"instanceName":"i-2-6-VM","type":"User","uuid":"b3813c2b-fc56-401c-9457-edafc3a51e1d"}] does not have a preferred storage pool or it cannot be used. Volume Orchestrator will use the available Storage Pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1","uuid":"32c3afb6-22db-3a73-ae6a-44d59bbfb70e"}], which was discovered using Storage Pool Allocator [ClusterScopeStoragePoolAllocator].
2025-01-29 10:29:00,394 DEBUG [o.a.c.s.a.LocalStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) LocalStoragePoolAllocator is returning null since the disk profile does not use local storage and bypassStorageTypeCheck is false.
2025-01-29 10:29:00,394 DEBUG [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Could not find any available Storage Pool using Storage Pool Allocator [LocalStoragePoolAllocator].
2025-01-29 10:29:00,394 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Looking for pools in dc [1], pod [1] and cluster [1]. Disabled pools will be ignored.
2025-01-29 10:29:00,396 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found pools [[Pool[1|NetworkFilesystem], Pool[2|NetworkFilesystem]]] that match with tags [[]].
2025-01-29 10:29:00,398 DEBUG [o.a.c.s.a.AbstractStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking if storage pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1","uuid":"32c3afb6-22db-3a73-ae6a-44d59bbfb70e"}] is suitable to disk [DskChr[DATADISK|0|]].
2025-01-29 10:29:00,400 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Volume [Vol[10|name=test7|vm=null|DATADISK]] is not allocated to any pool. Cannot check compatibility with pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1","uuid":"32c3afb6-22db-3a73-ae6a-44d59bbfb70e"}].
2025-01-29 10:29:00,400 INFO [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1 (1) does not supply IOPS capacity, assuming enough capacity
2025-01-29 10:29:00,401 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool 1 for storage, totalSize: 2197949513728, usedBytes: 1553425498112, usedPct: 0.7067612283219346, disable threshold: 0.95
2025-01-29 10:29:00,401 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Destination pool id: 1
2025-01-29 10:29:00,407 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Pool ID for the volume with ID 10 is null
2025-01-29 10:29:00,410 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1 of type NetworkFilesystem with overprovisioning factor 2
2025-01-29 10:29:00,410 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total over provisioned capacity calculated is 2 * (1.9990 TB) 2197949513728
2025-01-29 10:29:00,410 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total capacity of the pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1 with ID 1 is (3.9980 TB) 4395899027456
2025-01-29 10:29:00,411 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool: 1 for storage allocation , maxSize : (3.9980 TB) 4395899027456, totalAllocatedSize : (17.77 GB) 19076088016, askingSize : (1.00 GB) 1073741824, allocated disable threshold: 0.95
2025-01-29 10:29:00,411 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found suitable local storage pool [Pool[1|NetworkFilesystem]] to allocate disk [DskChr[DATADISK|0|]] to it, adding to list.
2025-01-29 10:29:00,411 DEBUG [o.a.c.s.a.AbstractStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking if storage pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765"}] is suitable to disk [DskChr[DATADISK|0|]].
2025-01-29 10:29:00,413 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Volume [Vol[10|name=test7|vm=null|DATADISK]] is not allocated to any pool. Cannot check compatibility with pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765"}].
2025-01-29 10:29:00,413 INFO [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2 (2) does not supply IOPS capacity, assuming enough capacity
2025-01-29 10:29:00,414 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool 2 for storage, totalSize: 2197949513728, usedBytes: 1553425498112, usedPct: 0.7067612283219346, disable threshold: 0.95
2025-01-29 10:29:00,414 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Destination pool id: 2
2025-01-29 10:29:00,420 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Pool ID for the volume with ID 10 is null
2025-01-29 10:29:00,423 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found storage pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2 of type NetworkFilesystem with overprovisioning factor 2
2025-01-29 10:29:00,423 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total over provisioned capacity calculated is 2 * (1.9990 TB) 2197949513728
2025-01-29 10:29:00,423 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Total capacity of the pool ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2 with ID 2 is (3.9980 TB) 4395899027456
2025-01-29 10:29:00,424 DEBUG [c.c.s.StorageManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Checking pool: 2 for storage allocation , maxSize : (3.9980 TB) 4395899027456, totalAllocatedSize : (12.88 GB) 13833208016, askingSize : (1.00 GB) 1073741824, allocated disable threshold: 0.95
2025-01-29 10:29:00,424 DEBUG [o.a.c.s.a.ClusterScopeStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Found suitable local storage pool [Pool[2|NetworkFilesystem]] to allocate disk [DskChr[DATADISK|0|]] to it, adding to list.
2025-01-29 10:29:00,424 DEBUG [o.a.c.s.a.AbstractStoragePoolAllocator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) ClusterScopeStoragePoolAllocator is returning [2] suitable storage pools [[{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri1","uuid":"32c3afb6-22db-3a73-ae6a-44d59bbfb70e"}, {"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765"}]].
2025-01-29 10:29:00,426 DEBUG [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) VM [VM instance {"id":6,"instanceName":"i-2-6-VM","type":"User","uuid":"b3813c2b-fc56-401c-9457-edafc3a51e1d"}] does not have a preferred storage pool or it cannot be used. Volume Orchestrator will use the available Storage Pool [{"name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765"}], which was discovered using Storage Pool Allocator [ClusterScopeStoragePoolAllocator].
2025-01-29 10:29:00,427 DEBUG [o.a.c.s.v.VolumeServiceImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) copying test7(id=10, role=Image) to ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2 (id=2, role=Primary)
2025-01-29 10:29:00,456 DEBUG [o.a.c.s.m.AncientDataMotionStrategy] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) copyAsync inspecting src type VOLUME copyAsync inspecting dest type VOLUME
2025-01-29 10:29:00,483 DEBUG [c.c.h.o.r.Ovm3HypervisorGuru] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) getCommandHostDelegation: class org.apache.cloudstack.storage.command.CopyCommand
2025-01-29 10:29:00,486 DEBUG [c.c.a.t.Request] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Seq 1-4875709546581983892: Sending { Cmd , MgmtId: 32985835373148, via: 1(ol8.localdomain), Ver: v1, Flags: 100111, [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"4bd368f6-d381-4e92-9f59-b8aba2f28b94","volumeType":"DATADISK","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"NFS://10.0.32.4/acs/secondary/ref-trl-7911-k-Mol8-kiran-chavala/ref-trl-7911-k-Mol8-kiran-chavala-sec1","_role":"Image"}},"name":"test7","size":"(1.00 GB) 1073741824","path":"volumes/2/10/86bb0b62-1e64-30e1-88b8-c1c5cb87b9ac.qcow2","volumeId":"10","accountId":"2","format":"QCOW2","provisioningType":"THIN","id":"10","hypervisorType":"KVM","directDownload":"false","deployAsIs":"false","followRedirects":"false"}},"destTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"4bd368f6-d381-4e92-9f59-b8aba2f28b94","volumeType":"DATADISK","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765","name":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","id":"2","poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-7911-k-Mol8-kiran-chavala/ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","port":"2049","url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-7911-k-Mol8-kiran-chavala/ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2/?ROLE=Primary&STOREUUID=56c2dd53-dde9-3fab-b356-6e5ec4c99765","isManaged":"false"}},"name":"test7","size":"(1.00 GB) 1073741824","volumeId":"10","accountId":"2","format":"QCOW2","provisioningType":"THIN","poolId":"2","id":"10","hypervisorType":"KVM","directDownload":"false","deployAsIs":"false","followRedirects":"false"}},"executeInSequence":"true","options":{},"options2":{},"wait":"10800","bypassHostMaintenance":"false"}}] }
2025-01-29 10:29:00,806 DEBUG [c.c.a.t.Request] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Seq 1-4875709546581983892: Received: { Ans: , MgmtId: 32985835373148, via: 1(ol8.localdomain), Ver: v1, Flags: 110, { CopyCmdAnswer } }
2025-01-29 10:29:00,818 DEBUG [o.a.c.s.v.VolumeObject] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Updated {"name":"test7","uuid":"4bd368f6-d381-4e92-9f59-b8aba2f28b94"} from {"encryptFormat":null,"format":"QCOW2","path":null,"poolId":2,"size":1073741824} to {"encryptFormat":null,"format":"QCOW2","path":"c13587b1-fc01-425a-b86e-3d50e7dcc497","poolId":2,"size":1073741824}
2025-01-29 10:29:00,838 DEBUG [c.c.h.o.r.Ovm3HypervisorGuru] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) getCommandHostDelegation: class org.apache.cloudstack.storage.command.DeleteCommand
2025-01-29 10:29:00,839 DEBUG [c.c.h.XenServerGuru] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) We are returning the default host to execute commands because the command is not of Copy type.
2025-01-29 10:29:00,841 DEBUG [c.c.a.t.Request] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Seq 3-4999840011311382707: Sending { Cmd , MgmtId: 32985835373148, via: 3(s-1-VM), Ver: v1, Flags: 100011, [{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"4bd368f6-d381-4e92-9f59-b8aba2f28b94","volumeType":"DATADISK","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"NFS://10.0.32.4/acs/secondary/ref-trl-7911-k-Mol8-kiran-chavala/ref-trl-7911-k-Mol8-kiran-chavala-sec1","_role":"Image"}},"name":"test7","size":"(1.00 GB) 1073741824","path":"volumes/2/10/86bb0b62-1e64-30e1-88b8-c1c5cb87b9ac.qcow2","volumeId":"10","accountId":"2","format":"QCOW2","provisioningType":"THIN","id":"10","hypervisorType":"KVM","directDownload":"false","deployAsIs":"false","followRedirects":"false"}},"wait":"0","bypassHostMaintenance":"false"}}] }
2025-01-29 10:29:00,907 DEBUG [c.c.a.t.Request] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Seq 3-4999840011311382707: Received: { Ans: , MgmtId: 32985835373148, via: 3(s-1-VM), Ver: v1, Flags: 10, { Answer } }
2025-01-29 10:29:00,911 DEBUG [c.c.r.ResourceLimitManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Updating resource Type = secondary_storage count for Account = 2 Operation = decreasing Amount = (1.00 GB) 1073741824
2025-01-29 10:29:00,916 DEBUG [c.c.r.ResourceLimitManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Updating resource Type = primary_storage count for Account = 2 Operation = increasing Amount = (1.00 GB) 1073741824
2025-01-29 10:29:00,927 DEBUG [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) host id is null, using last host id 1
2025-01-29 10:29:00,956 DEBUG [c.c.s.VolumeApiServiceImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Volume: test7 successfully attached to VM: i-2-6-VM
2025-01-29 10:29:00,962 DEBUG [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Done executing VM work job: com.cloud.vm.VmWorkAttachVolume{"volumeId":10,"deviceId":0,"userId":2,"accountId":2,"vmId":6,"handlerName":"VolumeApiServiceImpl"}
2025-01-29 10:29:00,962 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Complete async job-74, jobStatus: SUCCEEDED, resultCode: 0, result: rO0ABXNyAA5qYXZhLmxhbmcuTG9uZzuL5JDMjyPfAgABSgAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAAAAAACg
2025-01-29 10:29:00,963 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Publish async job-74 complete on message bus
2025-01-29 10:29:00,963 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Wake up jobs related to job-74
2025-01-29 10:29:00,963 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Update db status for job-74
2025-01-29 10:29:00,964 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74 ctx-b98fdfab) (logid:9fb8dbf5) Wake up jobs joined with job-74 and disjoin all subjobs created from job- 74
2025-01-29 10:29:00,970 DEBUG [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74) (logid:9fb8dbf5) Done with run of VM work job: com.cloud.vm.VmWorkAttachVolume for VM 6, job origin: 73
2025-01-29 10:29:00,970 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74) (logid:9fb8dbf5) Done executing com.cloud.vm.VmWorkAttachVolume for job-74
2025-01-29 10:29:00,972 INFO [o.a.c.f.j.i.AsyncJobMonitor] (Work-Job-Executor-24:ctx-83ef4252 job-73/job-74) (logid:9fb8dbf5) Remove job-74 from job monitoring
2025-01-29 10:29:00,988 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Complete async job-73, jobStatus: SUCCEEDED, resultCode: 0, result: org.apache.cloudstack.api.response.VolumeResponse/volume/{"id":"4bd368f6-d381-4e92-9f59-b8aba2f28b94","name":"test7","zoneid":"2d315cc0-8fea-4a39-9ca4-8c192b8b0a23","zonename":"ref-trl-7911-k-Mol8-kiran-chavala","type":"ROOT","deviceid":"0","virtualmachineid":"b3813c2b-fc56-401c-9457-edafc3a51e1d","vmname":"VM-b3813c2b-fc56-401c-9457-edafc3a51e1d","vmdisplayname":"VM-b3813c2b-fc56-401c-9457-edafc3a51e1d","vmstate":"Stopped","vmtype":"User","provisioningtype":"thin","size":"(1.00 GB) 1073741824","created":"2025-01-29T10:26:09+0000","state":"Ready","account":"admin","domainid":"2af5e437-de18-11ef-96b3-1e001d00025c","domain":"ROOT","domainpath":"/","storagetype":"shared","diskkbsread":"(0 bytes) 0","diskkbswrite":"(0 bytes) 0","diskioread":"(0 bytes) 0","diskiowrite":"(0 bytes) 0","hypervisor":"KVM","diskofferingid":"04b75a4a-2cbe-44ab-9c28-197326bb6ecc","diskofferingname":"Custom","diskofferingdisplaytext":"Custom Disk","storage":"ref-trl-7911-k-Mol8-kiran-chavala-kvm-pri2","attached":"2025-01-29T10:29:00+0000","destroyed":"false","isextractable":"true","displayvolume":"true","path":"c13587b1-fc01-425a-b86e-3d50e7dcc497","storageid":"56c2dd53-dde9-3fab-b356-6e5ec4c99765","quiescevm":"false","supportsstoragesnapshot":"false","clusterid":"8ea82d94-ba52-4f93-8e00-3aa3e015772e","clustername":"p1-c1","podid":"4d3f6b07-2ed8-49e5-be61-b4493af2fab7","podname":"Pod1","tags":[],"hasannotations":"false","jobid":"9fb8dbf5-1e24-4782-b861-79314c441678","jobstatus":"0"}
2025-01-29 10:29:00,989 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Publish async job-73 complete on message bus
2025-01-29 10:29:00,989 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Wake up jobs related to job-73
2025-01-29 10:29:00,989 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Update db status for job-73
2025-01-29 10:29:00,989 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73 ctx-dded8684) (logid:9fb8dbf5) Wake up jobs joined with job-73 and disjoin all subjobs created from job- 73
2025-01-29 10:29:00,993 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-43:ctx-0a82345b job-73) (logid:9fb8dbf5) Done executing org.apache.cloudstack.api.command.admin.volume.AttachVolumeCmdByAdmin for job-73
2025-01-29 10:29:00,993 INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-43:ctx-0a82345b job-73) (logid:9fb8dbf5) Remove job-73 from job monitoring
[SF] Trillian test result (tid-12220)
|
* server: fix attach uploaded volume Fixes apache#10120 When an uploaded volume is attached to a VM for which no existing volume can be found it was resulting in error. For such volumes, server needs to find a suitable pool first and copy them to the pool from secondary store. Signed-off-by: Abhishek Kumar <[email protected]> * fix Signed-off-by: Abhishek Kumar <[email protected]> * fix Signed-off-by: Abhishek Kumar <[email protected]> * add unit tests Signed-off-by: Abhishek Kumar <[email protected]> --------- Signed-off-by: Abhishek Kumar <[email protected]> Co-authored-by: Boris Stoyanov - a.k.a Bobby <[email protected]>
This reverts commit 1c84ce4.
@blueorangutan package |
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12340 |
@blueorangutan test matrix |
@DaanHoogland a [SL] Trillian-Jenkins matrix job (EL8 mgmt + EL8 KVM, Ubuntu22 mgmt + Ubuntu22 KVM, EL8 mgmt + VMware 7.0u3, EL9 mgmt + XCP-ng 8.2 ) has been kicked to run smoke tests |
[SF] Trillian test result (tid-12318)
|
[SF] Trillian test result (tid-12316)
|
[SF] Trillian test result (tid-12317)
|
[SF] Trillian test result (tid-12319)
|
Description
Fixes #10120
When an uploaded volume is attached to a VM for which no existing volume can be found it was resulting in error. For such volumes, server needs to find a suitable pool first and copy them to the pool from secondary store.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested uploading and attaching a volume in an advanced zone (KVM) to a VM with no disks,
How did you try to break this feature and the system with this change?