[ https://issues.apache.org/jira/browse/CLOUDSTACK-4139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13740548#comment-13740548 ]
Venkata Siva Vijayendra Bhamidipati commented on CLOUDSTACK-4139: ----------------------------------------------------------------- I see this happening with volumes that are created from snapshots of either root or data volumes. Was speaking with Kelven regarding this issue and observed that this is what is happening: 1) We create a data volume, a directory gets created in secondary storage. No vmdk gets deployed yet. 2) We then attach the volume to a VM, and that is when the volume gets created on primary. Its vmdk shows the disk controller as scsi: . .ddb.thinProvisioned = "1" ddb.adapterType = "lsilogic" 3) Then we create a snapshot from this volume. The snapshot gets created on secondary storage as expected, and its vmdk also shows the controller type as scsi: . . # The Disk Data Base #DDB ddb.adapterType = "lsilogic" ddb.geometry.cylinders = "652" . . So far, all is good. 4) Create a volume from the snapshot. This will create the volume on the primary, but then its disk controller type is getting set to IDE instead of SCSI: . . # The Disk Data Base #DDB ddb.adapterType = "ide" ddb.thinProvisioned = "1" ddb.geometry.sectors = "63" . . This IDE setting is causing the invalid disk backing info exception. vCenter expects this to be a SCSI disk. If I detach the volume from the VM, and then resize it, it uses a worker VM that doesn't pass in the controller type in the backing info and so the disk resize passes through fine. The disk can then be attached to the original VM. This is a workaround. As of now, am not sure why the disk controller is getting set to IDE. The restoreVolumeFromSecStorage() function in VmwareStorageProcessor.java is the exact point where this volume is created from a snapshot. Need to dig into where in this code path the controller setting is getting changed. The metadata files are copied over in moveAllVmDiskFiles(), so probably the problem lies somewhere in there. > [VMWARE][ZWPS] Failed to resize the volumes which are created from snapshot > ---------------------------------------------------------------------------- > > Key: CLOUDSTACK-4139 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4139 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Storage Controller, VMware > Affects Versions: 4.2.0 > Reporter: Sailaja Mada > Assignee: Venkata Siva Vijayendra Bhamidipati > Priority: Critical > Fix For: 4.2.0 > > Attachments: apilog.log, management-server.log, newdb.sql > > > Steps: > 1. Configure Adv zone with VMWARE cluster with Zone wide primary storage > 2. Deploy instance > 3. Create snapshot from ROOT volume > 4. Attach the volume to an instance > 5. Tried to resize the volume from 2 GB to 5 GB . > Observation: > 1. It Failed to resize the volumes which are created from snapshot . > 2. Task notification says resize is completed from UI but it failed and no > resize happened for this volume > 3. I could resize the DATA volumes which are added by using the disk offering > and attached to the instance. > 2013-08-07 16:37:31,370 DEBUG [agent.manager.AgentManagerImpl] > (AgentManager-Handler-6:null) SeqA 3-785: Sending Seq 3-785: { Ans: , > MgmtId: 187767034175903, via: 3, Ver: v1, Flags: 100010, > [{"com.cloud.agent.api.AgentControlAnswer":{"result":true,"wait":0}}] } > 2013-08-07 16:37:33,253 DEBUG [cloud.api.ApiServlet] (catalina-exec-21:null) > ===START=== 10.144.6.19 -- GET > command=resizeVolume&id=480c853c-e70a-46a0-a6d6-ae74b416f318&shrinkok=false&diskofferingid=34443d4d-f29c-4d3f-8bb6-f6ae76e34b0d&response=json&sessionkey=nmiUJgTgEEYHRt8hx5StkuJr5tA%3D&_=1375873540089 > 2013-08-07 16:37:33,296 DEBUG [cloud.async.AsyncJobManagerImpl] > (catalina-exec-21:null) submit async job-49 = [ > 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ], details: AsyncJobVO {id:49, userId: > 3, accountId: 3, sessionKey: null, instanceType: Volume, instanceId: null, > cmd: org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd, > cmdOriginator: null, cmdInfo: > {"id":"480c853c-e70a-46a0-a6d6-ae74b416f318","response":"json","sessionkey":"nmiUJgTgEEYHRt8hx5StkuJr5tA\u003d","shrinkok":"false","cmdEventType":"VOLUME.RESIZE","ctxUserId":"3","httpmethod":"GET","_":"1375873540089","ctxAccountId":"3","diskofferingid":"34443d4d-f29c-4d3f-8bb6-f6ae76e34b0d","ctxStartEventId":"182"}, > cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, > processStatus: 0, resultCode: 0, result: null, initMsid: 187767034175903, > completeMsid: null, lastUpdated: null, lastPolled: null, created: null} > 2013-08-07 16:37:33,301 DEBUG [cloud.api.ApiServlet] (catalina-exec-21:null) > ===END=== 10.144.6.19 -- GET > command=resizeVolume&id=480c853c-e70a-46a0-a6d6-ae74b416f318&shrinkok=false&diskofferingid=34443d4d-f29c-4d3f-8bb6-f6ae76e34b0d&response=json&sessionkey=nmiUJgTgEEYHRt8hx5StkuJr5tA%3D&_=1375873540089 > 2013-08-07 16:37:33,342 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-32:job-49 = [ 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ]) Executing > org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd for job-49 = [ > 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ] > 2013-08-07 16:37:33,488 DEBUG [cloud.user.AccountManagerImpl] > (Job-Executor-32:job-49 = [ 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ]) Access to > Vol[35|vm=16|DATADISK] granted to Acct[3-cdcuser1] by > DomainChecker_EnhancerByCloudStack_ccb7a71 > 2013-08-07 16:37:33,534 DEBUG [agent.transport.Request] > (Job-Executor-32:job-49 = [ 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ]) Seq > 2-1287389738: Sending { Cmd , MgmtId: 187767034175903, via: 2, Ver: v1, > Flags: 100011, > [{"com.cloud.agent.api.storage.ResizeVolumeCommand":{"path":"e9166262ee514a398028c04bf21d80b7","pool":{"id":2,"uuid":"004a6f4c-232c-3a09-9013-e47fe47da3fb","host":"10.102.192.100","path":"/cpg_vol/sailaja/finalps2","port":2049,"type":"NetworkFilesystem"},"vmInstance":"i-3-16-VM","newSize":5368709120,"currentSize":2147483648,"shrinkOk":false,"wait":0}}] > } > 2013-08-07 16:37:33,534 DEBUG [agent.transport.Request] > (Job-Executor-32:job-49 = [ 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ]) Seq > 2-1287389738: Executing: { Cmd , MgmtId: 187767034175903, via: 2, Ver: v1, > Flags: 100011, > [{"com.cloud.agent.api.storage.ResizeVolumeCommand":{"path":"e9166262ee514a398028c04bf21d80b7","pool":{"id":2,"uuid":"004a6f4c-232c-3a09-9013-e47fe47da3fb","host":"10.102.192.100","path":"/cpg_vol/sailaja/finalps2","port":2049,"type":"NetworkFilesystem"},"vmInstance":"i-3-16-VM","newSize":5368709120,"currentSize":2147483648,"shrinkOk":false,"wait":0}}] > } > 2013-08-07 16:37:33,557 DEBUG [agent.manager.DirectAgentAttache] > (DirectAgent-32:null) Seq 2-1287389738: Executing request > 2013-08-07 16:37:33,595 INFO [vmware.mo.VirtualMachineMO] > (DirectAgent-32:10.102.192.18) Look for disk device info from volume : > e9166262ee514a398028c04bf21d80b7 > 2013-08-07 16:37:33,597 INFO [vmware.mo.VirtualMachineMO] > (DirectAgent-32:10.102.192.18) Test against disk device, controller key: 200, > unit number: 1 > 2013-08-07 16:37:33,597 INFO [vmware.mo.VirtualMachineMO] > (DirectAgent-32:10.102.192.18) Test against disk backing : > [004a6f4c232c3a099013e47fe47da3fb] ROOT-16.vmdk > 2013-08-07 16:37:33,597 INFO [vmware.mo.VirtualMachineMO] > (DirectAgent-32:10.102.192.18) Test against disk backing : > [004a6f4c232c3a099013e47fe47da3fb] > 9ace158f21963beaae34b3a20ce17094/9ace158f21963beaae34b3a20ce17094.vmdk > 2013-08-07 16:37:33,597 INFO [vmware.mo.VirtualMachineMO] > (DirectAgent-32:10.102.192.18) Test against disk device, controller key: > 1000, unit number: 0 > 2013-08-07 16:37:33,597 INFO [vmware.mo.VirtualMachineMO] > (DirectAgent-32:10.102.192.18) Test against disk backing : > [004a6f4c232c3a099013e47fe47da3fb] e9166262ee514a398028c04bf21d80b7.vmdk > 2013-08-07 16:37:33,598 INFO [vmware.mo.VirtualMachineMO] > (DirectAgent-32:10.102.192.18) Disk backing : > [004a6f4c232c3a099013e47fe47da3fb] e9166262ee514a398028c04bf21d80b7.vmdk > matches ==> scsi0:0 > 2013-08-07 16:37:34,788 ERROR [vmware.resource.VmwareResource] > (DirectAgent-32:10.102.192.18) Unable to resize volume > java.lang.RuntimeException: Incompatible device backing specified for device > '0'. > at > com.cloud.hypervisor.vmware.util.VmwareClient.waitForTask(VmwareClient.java:290) > at > com.cloud.hypervisor.vmware.mo.VirtualMachineMO.configureVm(VirtualMachineMO.java:835) > at > com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:648) > at > com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:560) > at > com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:679) > 2013-08-07 16:37:34,789 DEBUG [agent.manager.DirectAgentAttache] > (DirectAgent-32:null) Seq 2-1287389738: Response Received: > 2013-08-07 16:37:34,789 DEBUG [agent.transport.Request] (DirectAgent-32:null) > Seq 2-1287389738: Processing: { Ans: , MgmtId: 187767034175903, via: 2, Ver: > v1, Flags: 10, > [{"com.cloud.agent.api.storage.ResizeVolumeAnswer":{"newSize":0,"result":false,"details":"failed > to resize volume:java.lang.RuntimeException: Incompatible device backing > specified for device '0'.","wait":0}}] } > 2013-08-07 16:37:34,790 DEBUG [agent.transport.Request] > (Job-Executor-32:job-49 = [ 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ]) Seq > 2-1287389738: Received: { Ans: , MgmtId: 187767034175903, via: 2, Ver: v1, > Flags: 10, { ResizeVolumeAnswer } } > 2013-08-07 16:37:34,800 WARN > [storage.datastore.ObjectInDataStoreManagerImpl] (Job-Executor-32:job-49 = [ > 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ]) Unsupported data object (VOLUME, > org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@53600c96), no > need to delete from object in store ref table > 2013-08-07 16:37:34,860 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-32:job-49 = [ 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ]) Complete > async job-49 = [ 40ec270a-a5ff-450d-9c5d-9ee3bfb87b98 ], jobStatus: 1, > resultCode: 0, result: > org.apache.cloudstack.api.response.VolumeResponse@3886ea47 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira