Search in sources :

Example 1 with FileMirrorRollbackCompleter

use of com.emc.storageos.volumecontroller.impl.file.FileMirrorRollbackCompleter in project coprhd-controller by CoprHD.

the class FileReplicationDeviceController method rollbackMirrorFileShareStep.

/**
 * Roll back Mirror session between source and target
 *
 * @param systemURI
 * @param sourceURIs
 * @param targetURIs
 * @param opId
 * @return
 */
public boolean rollbackMirrorFileShareStep(URI systemURI, List<URI> sourceURIs, List<URI> targetURIs, String opId) {
    log.info("START rollback Mirror links");
    TaskCompleter completer = null;
    try {
        WorkflowStepCompleter.stepExecuting(opId);
        StorageSystem system = getStorageSystem(systemURI);
        completer = new FileMirrorRollbackCompleter(sourceURIs, opId);
        getRemoteMirrorDevice(system).doRollbackMirrorLink(system, sourceURIs, targetURIs, completer, opId);
    } catch (Exception e) {
        log.error("Ignoring exception while rolling back Mirror sources: {}", sourceURIs, e);
        // Succeed here, to allow other rollbacks to run
        if (null != completer) {
            completer.ready(dbClient);
        }
        WorkflowStepCompleter.stepSucceded(opId);
        return false;
    }
    return true;
}
Also used : FileMirrorRollbackCompleter(com.emc.storageos.volumecontroller.impl.file.FileMirrorRollbackCompleter) TaskCompleter(com.emc.storageos.volumecontroller.TaskCompleter) MirrorFileCreateTaskCompleter(com.emc.storageos.volumecontroller.impl.file.MirrorFileCreateTaskCompleter) WorkflowException(com.emc.storageos.workflow.WorkflowException) InternalException(com.emc.storageos.svcs.errorhandling.resources.InternalException) ControllerException(com.emc.storageos.volumecontroller.ControllerException) DeviceControllerException(com.emc.storageos.exceptions.DeviceControllerException) StorageSystem(com.emc.storageos.db.client.model.StorageSystem)

Aggregations

StorageSystem (com.emc.storageos.db.client.model.StorageSystem)1 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)1 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)1 ControllerException (com.emc.storageos.volumecontroller.ControllerException)1 TaskCompleter (com.emc.storageos.volumecontroller.TaskCompleter)1 FileMirrorRollbackCompleter (com.emc.storageos.volumecontroller.impl.file.FileMirrorRollbackCompleter)1 MirrorFileCreateTaskCompleter (com.emc.storageos.volumecontroller.impl.file.MirrorFileCreateTaskCompleter)1 WorkflowException (com.emc.storageos.workflow.WorkflowException)1