You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Srikanteswararao Talluri (JIRA)" <ji...@apache.org> on 2014/09/04 14:23:51 UTC
[jira] [Resolved] (CLOUDSTACK-7228) [Automation] Unable to shrink
data disk attached to a VM on XenServer
[ https://issues.apache.org/jira/browse/CLOUDSTACK-7228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Srikanteswararao Talluri resolved CLOUDSTACK-7228.
--------------------------------------------------
Resolution: Fixed
This should get fixed with John's patch. Marking it fixed. Please reopen if this reappears.
> [Automation] Unable to shrink data disk attached to a VM on XenServer
> ---------------------------------------------------------------------
>
> Key: CLOUDSTACK-7228
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7228
> Project: CloudStack
> Issue Type: Test
> Security Level: Public(Anyone can view this level - this is the default.)
> Components: Automation, Test, Volumes
> Affects Versions: 4.5.0
> Reporter: Chandan Purushothama
> Assignee: Chandan Purushothama
> Priority: Critical
> Fix For: 4.5.0
>
> Attachments: management-server.zip
>
>
> ==============
> Automation Code:
> ==============
> def test_08_resize_volume(self):
> """Test resize a volume"""
> #Verify the size is the new size is what we wanted it to be.
> self.debug(
> "Attaching volume (ID: %s) to VM (ID: %s)" % (
> self.volume.id,
> self.virtual_machine.id
> ))
> self.virtual_machine.attach_volume(self.apiClient, self.volume)
> self.attached = True
> hosts = Host.list(self.apiClient, id=self.virtual_machine.hostid)
> self.assertTrue(isinstance(hosts, list))
> self.assertTrue(len(hosts) > 0)
> self.debug("Found %s host" % hosts[0].hypervisor)
> if hosts[0].hypervisor == "XenServer":
> self.virtual_machine.stop(self.apiClient)
> elif hosts[0].hypervisor.lower() == "vmware":
> self.skipTest("Resize Volume is unsupported on VmWare")
> #resize the data disk
> self.debug("Resize Volume ID: %s" % self.volume.id)
> self.services["disk_offering"]["disksize"] = 20
> disk_offering_20_GB = DiskOffering.create(
> self.apiclient,
> self.services["disk_offering"]
> )
> self.cleanup.append(disk_offering_20_GB)
> cmd = resizeVolume.resizeVolumeCmd()
> cmd.id = self.volume.id
> cmd.diskofferingid = disk_offering_20_GB.id
> self.apiClient.resizeVolume(cmd)
> ===========================
> Error Thrown in Automation Logs:
> ===========================
> =========================
> ERROR: Test resize a volume
> --------------------------------------------
> Traceback (most recent call last):
> File "/home/chandan/test_volumes.py", line 693, in test_08_resize_volume
> self.apiClient.resizeVolume(cmd)
> File "/usr/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py", line 1672, in resizeVolume
> response = self.connection.marvinRequest(command, response_type=response, method=method)
> File "/usr/lib/python2.7/site-packages/marvin/cloudstackConnection.py", line 379, in marvinRequest
> raise e
> Exception: Job failed: {jobprocstatus : 0, created : u'2014-08-07T16:45:25-0700', cmd : u'org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin', userid : u'89a9018a-12a8-11e4-b75e-06098c000757', jobstatus : 2, jobid : u'7d5c9749-67d6-4fab-a0bf-f5bc8722b276', jobresultcode : 530, jobresulttype : u'object', jobresult : {errorcode : 530, errortext : u'Job failed due to exception failed to resize volume:SR_BACKEND_FAILURE_79VDI Invalid size [opterr=shrinking not allowed]'}, accountid : u'89a8f4e2-12a8-11e4-b75e-06098c000757'}
> -------------------- >> begin captured stdout << ---------------------
> === TestName: test_08_resize_volume | Status : EXCEPTION ===
> ==========================
> Error in Management Server Log:
> ==========================
> 2014-08-07 14:15:39,459 DEBUG [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-23:ctx-62ca6450 job-1314/job-1315 ctx-0761b68e) Execute VM work job: com.cloud.storage.VmWorkResizeVolume{"volumeId":172,"currentSize":21474836480,"newSize":10737418240,"newServiceOfferingId":43,"shrinkOk":true,"userId":2,"accountId":2,"vmId":162,"handlerName":"VolumeApiServiceImpl"}
> 2014-08-07 14:15:39,487 DEBUG [c.c.a.t.Request] (Work-Job-Executor-23:ctx-62ca6450 job-1314/job-1315 ctx-0761b68e) Seq 1-1425952232016183856: Sending { Cmd , MgmtId: 6638073284439, via: 1(Rack3Host6.lab.vmops.com), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.storage.ResizeVolumeCommand":{"path":"32f13207-5e56-4ed7-847a-4f1db3dea1e0","pool":{"id":1,"uuid":"afb9d57d-6258-3eaa-bf14-803cdba34506","host":"10.223.110.232","path":"/export/home/chandan/44-130-79-z2/primary","port":2049,"type":"NetworkFilesystem"},"vmInstance":"i-71-162-MyTestVM","newSize":10737418240,"currentSize":21474836480,"shrinkOk":true,"wait":0}}] }
> 2014-08-07 14:15:39,487 DEBUG [c.c.a.t.Request] (Work-Job-Executor-23:ctx-62ca6450 job-1314/job-1315 ctx-0761b68e) Seq 1-1425952232016183856: Executing: { Cmd , MgmtId: 6638073284439, via: 1(Rack3Host6.lab.vmops.com), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.storage.ResizeVolumeCommand":{"path":"32f13207-5e56-4ed7-847a-4f1db3dea1e0","pool":{"id":1,"uuid":"afb9d57d-6258-3eaa-bf14-803cdba34506","host":"10.223.110.232","path":"/export/home/chandan/44-130-79-z2/primary","port":2049,"type":"NetworkFilesystem"},"vmInstance":"i-71-162-MyTestVM","newSize":10737418240,"currentSize":21474836480,"shrinkOk":true,"wait":0}}] }
> 2014-08-07 14:15:39,487 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-124:ctx-f49933f3) Seq 1-1425952232016183856: Executing request
> 2014-08-07 14:15:39,670 WARN [c.c.h.x.r.CitrixResourceBase] (DirectAgent-124:ctx-f49933f3) Unable to resize volume
> SR_BACKEND_FAILURE_79VDI Invalid size [opterr=shrinking not allowed]
> at com.xensource.xenapi.Types.checkResponse(Types.java:2021)
> at com.xensource.xenapi.Connection.dispatch(Connection.java:395)
> at com.cloud.hypervisor.xenserver.resource.XenServerConnectionPool$XenServerConnection.dispatch(XenServerConnectionPool.java:463)
> at com.xensource.xenapi.VDI.resize(VDI.java:1294)
> at com.cloud.hypervisor.xenserver.resource.CitrixResourceBase.execute(CitrixResourceBase.java:5669)
> at com.cloud.hypervisor.xenserver.resource.CitrixResourceBase.executeRequest(CitrixResourceBase.java:465)
> at com.cloud.hypervisor.xenserver.resource.XenServer56Resource.executeRequest(XenServer56Resource.java:64)
> at com.cloud.hypervisor.xenserver.resource.XenServer610Resource.executeRequest(XenServer610Resource.java:101)
> at com.cloud.hypervisor.xenserver.resource.XenServer620SP1Resource.executeRequest(XenServer620SP1Resource.java:65)
> at com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:294)
> at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
> at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
> at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
> at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
> at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> 2014-08-07 14:15:39,671 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-124:ctx-f49933f3) Seq 1-1425952232016183856: Response Received:
> 2014-08-07 14:15:39,673 DEBUG [c.c.a.t.Request] (DirectAgent-124:ctx-f49933f3) Seq 1-1425952232016183856: Processing: { Ans: , MgmtId: 6638073284439, via: 1, Ver: v1, Flags: 10, [{"com.cloud.agent.api.storage.ResizeVolumeAnswer":{"newSize":0,"result":false,"details":"failed to resize volume:SR_BACKEND_FAILURE_79VDI Invalid size [opterr=shrinking not allowed]","wait":0}}] }
> 2014-08-07 14:15:39,673 DEBUG [c.c.a.t.Request] (Work-Job-Executor-23:ctx-62ca6450 job-1314/job-1315 ctx-0761b68e) Seq 1-1425952232016183856: Received: { Ans: , MgmtId: 6638073284439, via: 1, Ver: v1, Flags: 10, { ResizeVolumeAnswer } }
> 2014-08-07 14:15:39,686 WARN [o.a.c.s.d.ObjectInDataStoreManagerImpl] (Work-Job-Executor-23:ctx-62ca6450 job-1314/job-1315 ctx-0761b68e) Unsupported data object (VOLUME, org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@1b7f4100), no need to delete from object in store ref table
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)