use of org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class GetImageInfoVDSCommand method executeIrsBrokerCommand.
@Override
protected void executeIrsBrokerCommand() {
GetVolumeInfoVDSCommandParameters p = new GetVolumeInfoVDSCommandParameters(getCurrentIrsProxy().getCurrentVdsId(), getParameters().getStoragePoolId(), getParameters().getStorageDomainId(), getParameters().getImageGroupId(), getParameters().getImageId());
DiskImage di = (DiskImage) resourceManager.runVdsCommand(VDSCommandType.GetVolumeInfo, p).getReturnValue();
// if couldn't parse image then succeeded should be false
getVDSReturnValue().setSucceeded(di != null);
if (!getVDSReturnValue().getSucceeded()) {
log.error("Failed to get the volume information, marking as FAILED");
}
setReturnValue(di);
}
use of org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class SPMGetVolumeInfoVDSCommand method executeIrsBrokerCommand.
@Override
protected void executeIrsBrokerCommand() {
log.info("Executing GetVolumeInfo using the current SPM");
GetVolumeInfoVDSCommandParameters params = new GetVolumeInfoVDSCommandParameters(getCurrentIrsProxy().getCurrentVdsId(), getParameters().getStoragePoolId(), getParameters().getStorageDomainId(), getParameters().getImageGroupId(), getParameters().getImageId());
params.setExpectedEngineErrors(getParameters().getExpectedEngineErrors());
setVDSReturnValue(resourceManager.runVdsCommand(VDSCommandType.GetVolumeInfo, params));
}
use of org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class GetQemuImageInfoVDSCommand method executeVdsBrokerCommand.
@Override
protected void executeVdsBrokerCommand() {
GetVolumeInfoVDSCommandParameters params = getParameters();
result = getBroker().getQemuImageInfo(params.getStorageDomainId().toString(), params.getStoragePoolId().toString(), params.getImageGroupId().toString(), params.getImageId().toString());
proceedProxyReturnValue();
setReturnValue(buildImageEntity(result.getQemuImageInfo()));
getVDSReturnValue().setSucceeded(getReturnValue() != null);
}
use of org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class VdsmImagePoller method pollImage.
protected HostJobStatus pollImage(Guid storagePoolId, Guid storageDomainId, Guid imageGroupId, Guid imageId, int executionGeneration, Guid cmdId, ActionType actionType) {
Image imageInfo = ((DiskImage) vdsCommandsHelper.runVdsCommandWithoutFailover(VDSCommandType.GetVolumeInfo, new GetVolumeInfoVDSCommandParameters(storagePoolId, storageDomainId, imageGroupId, imageId), storagePoolId, null).getReturnValue()).getImage();
if (imageInfo.getLeaseStatus() != null && !imageInfo.getLeaseStatus().isFree()) {
log.info("Command {} id: '{}': the volume lease is not FREE - the job is running", actionType, cmdId);
return HostJobStatus.running;
}
if (imageInfo.getGeneration() == executionGeneration + 1) {
log.info("Command {} id: '{}': the volume lease is free and the generation was incremented - the " + "job execution has completed successfully", actionType, cmdId);
return HostJobStatus.done;
}
if (imageInfo.getGeneration() == executionGeneration + StorageConstants.ENTITY_FENCING_GENERATION_DIFF) {
log.info("Command {} id: '{}': the volume generation was incremented by the job fencing diff - the job " + "was fenced and its status can be considered as failed", actionType, cmdId);
return HostJobStatus.failed;
}
log.info("Command {} id: '{}': couldn't determine the status of the job by entity polling", actionType, cmdId);
return null;
}
use of org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class GetVolumeInfoVDSCommand method executeVdsBrokerCommand.
@Override
protected void executeVdsBrokerCommand() {
GetVolumeInfoVDSCommandParameters params = getParameters();
result = getBroker().getVolumeInfo(params.getStorageDomainId().toString(), params.getStoragePoolId().toString(), params.getImageGroupId().toString(), params.getImageId().toString());
proceedProxyReturnValue();
setReturnValue(buildImageEntity(result.getVolumeInfo()));
getVDSReturnValue().setSucceeded(getReturnValue() != null);
}
Aggregations