Search in sources :

Example 6 with EngineError

use of org.ovirt.engine.core.common.errors.EngineError in project ovirt-engine by oVirt.

the class SpmStatusVDSCommand method proceedProxyReturnValue.

@Override
protected void proceedProxyReturnValue() {
    EngineError returnStatus = getReturnValueFromStatus(getReturnStatus());
    switch(returnStatus) {
        case StoragePoolUnknown:
            // ignore this, the parser can handle the empty result.
            break;
        default:
            super.proceedProxyReturnValue();
            initializeVdsError(returnStatus);
            break;
    }
}
Also used : EngineError(org.ovirt.engine.core.common.errors.EngineError)

Example 7 with EngineError

use of org.ovirt.engine.core.common.errors.EngineError in project ovirt-engine by oVirt.

the class AbstractGlusterBrokerCommand method proceedProxyReturnValue.

@Override
protected void proceedProxyReturnValue() {
    EngineError returnStatus = getReturnValueFromStatus(getReturnStatus());
    switch(returnStatus) {
        case GlusterGeneralException:
        case GlusterPermissionDeniedException:
        case GlusterSyntaxErrorException:
        case GlusterMissingArgumentException:
        case GlusterCmdExecFailedException:
        case GlusterXmlErrorException:
        case GlusterVolumeCreateFailed:
        case GlusterVolumeStartFailed:
        case GlusterVolumeStopFailed:
        case AddBricksToGlusterVolumeFailed:
        case GlusterVolumeSetOptionFailed:
        case GlusterVolumeRebalanceStartFailed:
        case GlusterVolumeGeoRepSessionStartFailed:
        case GlusterVolumeDeleteFailed:
        case GlusterVolumeReplaceBrickStartFailed:
        case GlusterVolumeReplaceBrickFailed:
        case GlusterVolumeListFailed:
        case GlusterVolumeOptionInfoFailed:
        case GlusterVolumeResetOptionsFailed:
        case GlusterVolumeRemoveBricksFailed:
        case GlusterVolumeProfileStartFailed:
        case GlusterVolumeGeoRepSessionPauseFailed:
        case GlusterVolumeProfileStopFailed:
        case GlusterAddHostFailed:
        case GlusterHostRemoveFailedException:
        case GlusterHostIsNotPartOfCluster:
        case GlusterPeerListFailed:
        case GlusterVolumeStatusFailed:
        case GlusterVolumeProfileInfoFailed:
        case GlusterHookFailed:
        case GlusterHookEnableFailed:
        case GlusterHookDisableFailed:
        case GlusterHookNotFound:
        case GlusterHookListException:
        case GlusterHostUUIDNotFound:
        case GlusterHookConflict:
        case GlusterHookUpdateFailed:
        case GlusterHookAlreadyExists:
        case GlusterHookChecksumMismatch:
        case GlusterHookAddFailed:
        case GlusterHookRemoveFailed:
        case GlusterServicesActionFailed:
        case GlusterServiceActionNotSupported:
        case GlusterVolumeRebalanceStopFailed:
        case GlusterVolumeStatusAllFailedException:
        case GlusterVolumeRebalanceStatusFailedException:
        case GlusterVolumeEmptyCheckFailed:
        case GlusterGeoRepPublicKeyFileCreateFailed:
        case GlusterGeoRepPublicKeyFileReadError:
        case GlusterGeoRepUserNotFound:
        case GlusterGeoRepPublicKeyWriteFailed:
        case GlusterGeoRepExecuteMountBrokerOptFailed:
        case GlusterGeoRepExecuteMountBrokerUserAddFailed:
        case GlusterMountBrokerRootCreateFailed:
        case GlusterGeoRepSessionCreateFailed:
        case GlusterVolumeGeoRepSessionResumeFailed:
        case GlusterGeoRepException:
        case GlusterVolumeRemoveBricksStartFailed:
        case GlusterVolumeRemoveBricksStopFailed:
        case GlusterVolumeRemoveBrickStatusFailed:
        case GlusterVolumeRemoveBricksCommitFailed:
        case GlusterVolumeGeoRepStatusFailed:
        case GlusterGeoRepConfigFailed:
        case GlusterLibgfapiException:
        case GlfsStatvfsException:
        case GlfsInitException:
        case GlfsFiniException:
        case GlusterGeoRepSessionDeleteFailedException:
        case GlusterVolumeGeoRepSessionStopFailed:
        case GlusterSnapshotException:
        case GlusterSnapshotInfoFailedException:
        case GlusterSnapshotDeleteFailedException:
        case GlusterSnapshotActivateFailedException:
        case GlusterSnapshotDeactivateFailedException:
        case GlusterSnapshotRestoreFailedException:
        case GlusterSnapshotCreateFailedException:
        case GlusterSnapshotConfigFailedException:
        case GlusterSnapshotConfigSetFailedException:
        case GlusterSnapshotConfigGetFailedException:
        case GlusterHostStorageDeviceNotFoundException:
        case GlusterHostStorageDeviceInUseException:
        case GlusterHostStorageDeviceMountFailedException:
        case GlusterHostStorageDeviceFsTabFoundException:
        case GlusterHostStorageDevicePVCreateFailedException:
        case GlusterHostStorageDeviceLVConvertFailedException:
        case GlusterHostStorageDeviceLVChangeFailedException:
        case GlusterHostStorageDeviceMakeDirsFailedException:
        case GlusterHostStorageMountPointInUseException:
        case GlusterHostStorageDeviceVGCreateFailedException:
        case GlusterHostStorageDeviceVGScanFailedException:
        case GlusterHostFailedToSetSelinuxContext:
        case GlusterHostFailedToRunRestorecon:
        case GlusterSnapshotScheduleFlagUpdateFailedException:
        case GlusterDisableSnapshotScheduleFailedException:
        case GlusterMetaVolumeMountFailedException:
        case GlusterMetaVolumeFstabUpdateFailedException:
        case GlusterProcessesStopFailedException:
        case GlusterVolumeHealInfoFailedException:
        case GlusterEventException:
        case GlusterWebhookAddException:
        case GlusterWebhookSyncException:
        case GlusterWebhookUpdateException:
        case GlusterWebhookDeleteException:
        case GlusterVolumeResetBrickStartFailed:
        case GlusterVolumeResetBrickFailed:
            // Capture error from gluster command and record failure
            getVDSReturnValue().setVdsError(new VDSError(returnStatus, getReturnStatus().message));
            getVDSReturnValue().setSucceeded(false);
            break;
        default:
            super.proceedProxyReturnValue();
            break;
    }
}
Also used : VDSError(org.ovirt.engine.core.common.errors.VDSError) EngineError(org.ovirt.engine.core.common.errors.EngineError)

Example 8 with EngineError

use of org.ovirt.engine.core.common.errors.EngineError in project ovirt-engine by oVirt.

the class HSMClearTaskVDSCommand method proceedProxyReturnValue.

@Override
protected void proceedProxyReturnValue() {
    EngineError returnStatus = getReturnValueFromStatus(getReturnStatus());
    switch(returnStatus) {
        case UnknownTask:
            log.error("Trying to remove unknown task '{}'", getParameters().getTaskId());
            return;
        case TaskStateError:
            initializeVdsError(returnStatus);
            getVDSReturnValue().setSucceeded(false);
            return;
    }
    super.proceedProxyReturnValue();
}
Also used : EngineError(org.ovirt.engine.core.common.errors.EngineError)

Example 9 with EngineError

use of org.ovirt.engine.core.common.errors.EngineError in project ovirt-engine by oVirt.

the class HSMGetTaskStatusVDSCommand method proceedProxyReturnValue.

@Override
protected void proceedProxyReturnValue() {
    EngineError returnStatus = getReturnValueFromStatus(getReturnStatus());
    switch(returnStatus) {
        case UnknownTask:
            // ignore this, the parser can handle the empty result.
            break;
        default:
            super.proceedProxyReturnValue();
            initializeVdsError(returnStatus);
            break;
    }
}
Also used : EngineError(org.ovirt.engine.core.common.errors.EngineError)

Example 10 with EngineError

use of org.ovirt.engine.core.common.errors.EngineError in project ovirt-engine by oVirt.

the class ConnectStoragePoolVDSCommand method proceedConnectProxyReturnValue.

// Don't throw exception on errors except StoragePoolMasterNotFound for
// master domain failure treatment
protected void proceedConnectProxyReturnValue() {
    EngineError returnStatus = getReturnValueFromStatus(getReturnStatus());
    switch(returnStatus) {
        case Done:
        case StoragePoolMasterNotFound:
        case StoragePoolTooManyMasters:
        case StoragePoolWrongMaster:
            super.proceedProxyReturnValue();
            break;
        case ReleaseLockFailure:
        case AcquireHostIdFailure:
        case ReleaseHostIdFailure:
            VDSExceptionBase outEx = new VDSErrorException(String.format("Failed in vdscommand %1$s, error = %2$s", getCommandName(), getReturnStatus().message));
            initializeVdsError(returnStatus);
            getVDSReturnValue().setSucceeded(false);
            throw outEx;
        default:
            getVDSReturnValue().setSucceeded(false);
            initializeVdsError(returnStatus);
            break;
    }
}
Also used : EngineError(org.ovirt.engine.core.common.errors.EngineError)

Aggregations

EngineError (org.ovirt.engine.core.common.errors.EngineError)19 VDSError (org.ovirt.engine.core.common.errors.VDSError)6 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)2 IRSNoMasterDomainException (org.ovirt.engine.core.vdsbroker.irsbroker.IRSNoMasterDomainException)2 IRSNonOperationalException (org.ovirt.engine.core.vdsbroker.irsbroker.IRSNonOperationalException)2 IRSUnicodeArgumentException (org.ovirt.engine.core.vdsbroker.irsbroker.IRSUnicodeArgumentException)2 IrsOperationFailedNoFailoverException (org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException)2 VDSExceptionBase (org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase)2 HashSet (java.util.HashSet)1 Map (java.util.Map)1 AuditLogType (org.ovirt.engine.core.common.AuditLogType)1 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)1 StorageDomainStatus (org.ovirt.engine.core.common.businessentities.StorageDomainStatus)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 StoragePoolIsoMap (org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap)1 AuditLogable (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable)1 AuditLogableImpl (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)1 IrsBrokerCommand (org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand)1