Fix a typo caused problem in attach-volume process

This commit is contained in:
Kelven Yang 2013-12-31 15:12:54 -08:00
parent ac0faeb091
commit 737a382c38
3 changed files with 8 additions and 4 deletions

View File

@ -116,10 +116,8 @@ public class VmWorkJobHandlerProxy implements VmWorkJobHandler {
// legacy CloudStack code relies on checked exception for error handling
// we need to re-throw the real exception here
if (e.getCause() != null && e.getCause() instanceof Exception) {
s_logger.info("Rethrow exception " + e.getCause());
if (e.getCause() != null && e.getCause() instanceof Exception)
throw (Exception)e.getCause();
}
throw e;
}

View File

@ -40,6 +40,12 @@ import com.cloud.user.dao.AccountDao;
import com.cloud.utils.component.AdapterBase;
import com.cloud.vm.dao.VMInstanceDao;
/**
* Please note: VmWorkJobWakeupDispatcher is not currently in use. It is designed for event-driven based
* job processing model.
*
* Current code base uses blocking calls to wait for job completion
*/
public class VmWorkJobWakeupDispatcher extends AdapterBase implements AsyncJobDispatcher {
private static final Logger s_logger = Logger.getLogger(VmWorkJobWakeupDispatcher.class);

View File

@ -2360,7 +2360,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, null);
}
private Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(VmWorkAttachVolume work) throws Exception {
private Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(VmWorkDetachVolume work) throws Exception {
orchestrateDetachVolumeFromVM(work.getVmId(), work.getVolumeId());
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, null);
}