[jira] [Updated] (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 ] Animesh Chaturvedi updated CLOUDSTACK-7228: --- Issue Type: Test (was: Bug) > [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":
[jira] [Updated] (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 ] Chandan Purushothama updated CLOUDSTACK-7228: - Description: == 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] (Dire
[jira] [Updated] (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 ] Chandan Purushothama updated CLOUDSTACK-7228: - Summary: [Automation] Unable to shrink data disk attached to a VM on XenServer (was: [Automation] Unable to resize data disk attached to a VM) > [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: Bug > 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: > === > test_08_resize_volume (integration.smoke.test_volumes.TestVolumes): DEBUG: > Response : {jobprocstatus : 0, created : u'2014-08-01T18:08:45+', cmd : > u'org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin', > userid : u'8b4bcc64-1985-11e4-8117-4a45176012f1', jobstatus : 0, jobid : > u'd737369d-800f-4ff9-a8c3-19214c770c55', jobresultcode : 0, accountid : > u'8b4bbc2e-1985-11e4-8117-4a45176012f1'} > test_08_resize_volume (integration.smoke.test_volumes.TestVolumes): DEBUG: > === JobId:d737369d-800f-4ff9-a8c3-19214c770c55 is Still Processing, Will > TimeOut in:3595 > test_08_resize_volume (integration.smoke.test_volumes.TestVolumes): DEBUG: > Payload: {'signature': 'AT5AUgQqtT8ytrfN9OfN+1X37SE=', 'apiKey': > u'sfPBC6eFdp-wpQCQiYlsp7e-i4xoi3WgqX044cR7THvHSNrtZyEFTOOHpM6DfTwaq32cGJVAX7iUpYGs91GZxw', > 'command': 'queryAsyncJobResult', 'response': 'json', 'jobid': > u'd737369d-800f-4ff9-a8c3-19214c770c55'} > test_08_resize_volume (integration.smoke.test_volumes.TestVolumes): DEBUG: > Sending GET Cmd : queryAsyncJobResult=== > requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection > (1): 10.220.135.101 > requests.packages.urllib3.connectionpool: DEBUG: "GET > /client/api?signature=AT5AUgQqtT8ytrfN9OfN%2B1X37SE%3D&apiKey=sfPBC6eFdp-wpQCQiYlsp7e-i4xoi3WgqX044cR7THvHSNrtZyEFTOOHpM6DfTwaq32cGJVAX7iUpYGs91GZxw&command=queryAsyncJobResult&response=json&jobid=d737369d-800f-4ff9-a8c3-19214c770c55 > HTTP/1.1" 200 1396 > test_08_resize_volume (integration.smoke.test_volumes.TestVolumes): DEBUG: > Response : {jobprocstatus : 0, created : u'2014-08-01T18:08:45+', cmd : > u'org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin', > userid : u'8b4bcc64-1985-11e4-8117-4a45176012f1', jobstatus : 1, jobid : > u'd737369d-800f-4ff9-a8c3-19214c770c55', jobresultcode : 0, jobresulttype : > u'object', jobresult : {domain : u'ROOT', domainid : > u'6b74e43e-1985-11e4-8117-4a45176012f1', zoneid : > u'46c029a3-8481-48c3-b350-0b6798bb3527', storageid : > u'c21caded-8a9b-3e42-bf1d-b865e96d31c8', provisioningtype : u'thin', vmname : > u'VM-181a043d-fe8f