Hi,

I have a question about this logic (related to resizing a volume):

            AsyncJobExecutionContext jobContext =
AsyncJobExecutionContext.getCurrentExecutionContext();


            if (!VmJobEnabled.value() ||
jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {

                // avoid re-entrance


                VmWorkJobVO placeHolder = null;


                if (VmJobEnabled.value()) {

                    placeHolder = createPlaceHolderWork(userVm.getId());

                }


                try {

                    return orchestrateResizeVolume(volume.getId(),
currentSize, newSize,

                        newDiskOffering != null ?
cmd.getNewDiskOfferingId() : null, shrinkOk);

                } finally {

                    if (VmJobEnabled.value()) {

                        _workJobDao.expunge(placeHolder.getId());

                    }

                }


            } else {

                Outcome<Volume> outcome =
resizeVolumeThroughJobQueue(userVm.getId(), volume.getId(), currentSize,
newSize,

                        newDiskOffering != null ?
cmd.getNewDiskOfferingId() : null, shrinkOk);


Why would one resize the volume via the job queue versus the other path?

Thanks!
-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkow...@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Reply via email to