SibylDan / cloudsim

Automatically exported from code.google.com/p/cloudsim
0 stars 0 forks source link

Vm Host::getVm(int vmId, int userId) problems in DataCenter.class #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following methods in "Datacenter.class"
processCloudletMove
processCloudletResume
processCloudletPause
processCloudletCancel
processCloudletStatus

use getVm(userId,vmId) method from "Host.class" :

1- processCloudletMove:

Cloudlet cl = getVmAllocationPolicy().getHost(vmId, userId).getVm(userId, 
vmId).getCloudletScheduler().cloudletCancel(cloudletId);

2- processCloudletResume:

double eventTime = getVmAllocationPolicy().getHost(vmId,userId).getVm(userId, 
vmId).getCloudletScheduler().cloudletResume(cloudletId);

3- processCloudletPause:

boolean status = getVmAllocationPolicy().getHost(vmId,userId).getVm(userId, 
vmId).getCloudletScheduler().cloudletPause(cloudletId);

4-processCloudletCancel:

Cloudlet cl = getVmAllocationPolicy().getHost(vmId,userId).getVm(userId, 
vmId).getCloudletScheduler().cloudletCancel(cloudletId);

5- processCloudletStatus:

status = getVmAllocationPolicy().getHost(vmId, userId).getVm(userId, 
vmId).getCloudletScheduler().getCloudletStatus(cloudletId);

Therefore, the order of the parameter passing in calling getVm does not comply 
with its definition. Consequently, calling getVm in these methods leads NULL to 
be returned in general.

Version : 2.1 - 3.0

solution: 
change these codes to 

1- processCloudletMove:

Cloudlet cl = getVmAllocationPolicy().getHost(vmId, userId).getVm(vmId, 
userId).getCloudletScheduler().cloudletCancel(cloudletId);

2- processCloudletResume:

double eventTime = 
getVmAllocationPolicy().getHost(vmId,userId).getVm(vmId,userId).getCloudletSched
uler().cloudletResume(cloudletId);

3- processCloudletPause:

boolean status = 
getVmAllocationPolicy().getHost(vmId,userId).getVm(vmId,userId).getCloudletSched
uler().cloudletPause(cloudletId);

4-processCloudletCancel:

Cloudlet cl = getVmAllocationPolicy().getHost(vmId,userId).getVm(userId, 
vmId).getCloudletScheduler().cloudletCancel(cloudletId);

5- processCloudletStatus:

status = getVmAllocationPolicy().getHost(vmId, 
userId).getVm(vmId,userId).getCloudletScheduler().getCloudletStatus(cloudletId);

Reporter: seyedmehdi Hosseinimotlagh
email : mehdi.hoseini@gmail.com

Original issue reported on code.google.com by Mehdi.Ho...@gmail.com on 9 Dec 2012 at 9:37

GoogleCodeExporter commented 9 years ago
Sorry, this bug seems to be fixed according to "ISSUE 34"

Original comment by Mehdi.Ho...@gmail.com on 9 Dec 2012 at 10:08

GoogleCodeExporter commented 9 years ago

Original comment by rodrigo.calheiros on 14 Jan 2013 at 11:11