Skip to content

Commit 737a382

Browse files
committed
Fix a typo caused problem in attach-volume process
1 parent ac0faeb commit 737a382

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

engine/components-api/src/com/cloud/vm/VmWorkJobHandlerProxy.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,8 @@ public Pair<JobInfo.Status, String> handleVmWorkJob(VmWork work) throws Exceptio
116116

117117
// legacy CloudStack code relies on checked exception for error handling
118118
// we need to re-throw the real exception here
119-
if (e.getCause() != null && e.getCause() instanceof Exception) {
120-
s_logger.info("Rethrow exception " + e.getCause());
119+
if (e.getCause() != null && e.getCause() instanceof Exception)
121120
throw (Exception)e.getCause();
122-
}
123121

124122
throw e;
125123
}

engine/orchestration/src/com/cloud/vm/VmWorkJobWakeupDispatcher.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
import com.cloud.utils.component.AdapterBase;
4141
import com.cloud.vm.dao.VMInstanceDao;
4242

43+
/**
44+
* Please note: VmWorkJobWakeupDispatcher is not currently in use. It is designed for event-driven based
45+
* job processing model.
46+
*
47+
* Current code base uses blocking calls to wait for job completion
48+
*/
4349
public class VmWorkJobWakeupDispatcher extends AdapterBase implements AsyncJobDispatcher {
4450
private static final Logger s_logger = Logger.getLogger(VmWorkJobWakeupDispatcher.class);
4551

server/src/com/cloud/storage/VolumeApiServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2360,7 +2360,7 @@ private Pair<JobInfo.Status, String> orchestrateAttachVolumeToVM(VmWorkAttachVol
23602360
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, null);
23612361
}
23622362

2363-
private Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(VmWorkAttachVolume work) throws Exception {
2363+
private Pair<JobInfo.Status, String> orchestrateDetachVolumeFromVM(VmWorkDetachVolume work) throws Exception {
23642364
orchestrateDetachVolumeFromVM(work.getVmId(), work.getVolumeId());
23652365
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, null);
23662366
}

0 commit comments

Comments
 (0)