Search in sources :

Example 1 with SRDFMirrorCreateCompleter

use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter in project coprhd-controller by CoprHD.

the class SRDFDeviceController method createSrdfCgPairsStep.

public boolean createSrdfCgPairsStep(URI systemURI, List<URI> sourceURIs, List<URI> targetURIs, URI vpoolChangeUri, String opId) {
    log.info("START creating SRDF Pairs in CGs");
    SRDFMirrorCreateCompleter completer = null;
    try {
        WorkflowStepCompleter.stepExecuting(opId);
        StorageSystem system = getStorageSystem(systemURI);
        List<URI> combined = new ArrayList<>(sourceURIs);
        combined.addAll(targetURIs);
        completer = new SRDFMirrorCreateCompleter(combined, vpoolChangeUri, opId);
        InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_078);
        getRemoteMirrorDevice().doCreateCgPairs(system, sourceURIs, targetURIs, completer);
        InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_079);
    // No code after this point.
    } catch (Exception e) {
        completeAsError(completer, DeviceControllerException.errors.jobFailed(e), opId);
        return false;
    }
    return true;
}
Also used : SRDFMirrorCreateCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter) Lists.newArrayList(com.google.common.collect.Lists.newArrayList) ArrayList(java.util.ArrayList) NamedURI(com.emc.storageos.db.client.model.NamedURI) URI(java.net.URI) FCTN_STRING_TO_URI(com.emc.storageos.db.client.util.CommonTransformerFunctions.FCTN_STRING_TO_URI) WorkflowException(com.emc.storageos.workflow.WorkflowException) InternalException(com.emc.storageos.svcs.errorhandling.resources.InternalException) DeviceControllerException(com.emc.storageos.exceptions.DeviceControllerException) LockRetryException(com.emc.storageos.locking.LockRetryException) StorageSystem(com.emc.storageos.db.client.model.StorageSystem)

Example 2 with SRDFMirrorCreateCompleter

use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter in project coprhd-controller by CoprHD.

the class SRDFDeviceController method createListReplicas.

public boolean createListReplicas(URI systemURI, List<URI> sourceURIs, List<URI> targetURIs, URI vpoolChangeUri, boolean addWaitForCopyState, String opId) {
    log.info("START Creating list of replicas");
    TaskCompleter completer = null;
    try {
        WorkflowStepCompleter.stepExecuting(opId);
        StorageSystem system = getStorageSystem(systemURI);
        List<URI> combined = new ArrayList<>();
        combined.addAll(sourceURIs);
        combined.addAll(targetURIs);
        completer = new SRDFMirrorCreateCompleter(combined, vpoolChangeUri, opId);
        log.info("Sources: {}", Joiner.on(',').join(sourceURIs));
        log.info("Targets: {}", Joiner.on(',').join(targetURIs));
        log.info("OpId: {}", opId);
        getRemoteMirrorDevice().doCreateListReplicas(system, sourceURIs, targetURIs, addWaitForCopyState, completer);
    } catch (Exception e) {
        return completeAsError(completer, DeviceControllerException.errors.jobFailed(e), opId);
    }
    return true;
}
Also used : SRDFMirrorCreateCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter) Lists.newArrayList(com.google.common.collect.Lists.newArrayList) ArrayList(java.util.ArrayList) SRDFChangeCopyModeTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFChangeCopyModeTaskCompleter) TaskCompleter(com.emc.storageos.volumecontroller.TaskCompleter) NullTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.NullTaskCompleter) SRDFTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFTaskCompleter) NamedURI(com.emc.storageos.db.client.model.NamedURI) URI(java.net.URI) FCTN_STRING_TO_URI(com.emc.storageos.db.client.util.CommonTransformerFunctions.FCTN_STRING_TO_URI) WorkflowException(com.emc.storageos.workflow.WorkflowException) InternalException(com.emc.storageos.svcs.errorhandling.resources.InternalException) DeviceControllerException(com.emc.storageos.exceptions.DeviceControllerException) LockRetryException(com.emc.storageos.locking.LockRetryException) StorageSystem(com.emc.storageos.db.client.model.StorageSystem)

Example 3 with SRDFMirrorCreateCompleter

use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter in project coprhd-controller by CoprHD.

the class SRDFDeviceController method createSRDFVolumePairStep.

public boolean createSRDFVolumePairStep(final URI systemURI, final URI sourceURI, final URI targetURI, final URI vpoolChangeUri, final String opId) {
    log.info("START Add srdf volume pair");
    TaskCompleter completer = new SRDFMirrorCreateCompleter(sourceURI, targetURI, vpoolChangeUri, opId);
    try {
        log.info("Source: {}", sourceURI);
        log.info("Target: {}", targetURI);
        log.info("OpId: {}", opId);
        WorkflowStepCompleter.stepExecuting(opId);
        StorageSystem system = getStorageSystem(systemURI);
        InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_074);
        getRemoteMirrorDevice().doCreateLink(system, sourceURI, targetURI, completer);
        InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_075);
    } catch (Exception e) {
        return completeAsError(completer, DeviceControllerException.errors.jobFailed(e), opId);
    }
    return true;
}
Also used : SRDFMirrorCreateCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter) SRDFChangeCopyModeTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFChangeCopyModeTaskCompleter) TaskCompleter(com.emc.storageos.volumecontroller.TaskCompleter) NullTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.NullTaskCompleter) SRDFTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFTaskCompleter) WorkflowException(com.emc.storageos.workflow.WorkflowException) InternalException(com.emc.storageos.svcs.errorhandling.resources.InternalException) DeviceControllerException(com.emc.storageos.exceptions.DeviceControllerException) LockRetryException(com.emc.storageos.locking.LockRetryException) StorageSystem(com.emc.storageos.db.client.model.StorageSystem)

Aggregations

StorageSystem (com.emc.storageos.db.client.model.StorageSystem)3 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)3 LockRetryException (com.emc.storageos.locking.LockRetryException)3 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)3 SRDFMirrorCreateCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter)3 WorkflowException (com.emc.storageos.workflow.WorkflowException)3 NamedURI (com.emc.storageos.db.client.model.NamedURI)2 FCTN_STRING_TO_URI (com.emc.storageos.db.client.util.CommonTransformerFunctions.FCTN_STRING_TO_URI)2 TaskCompleter (com.emc.storageos.volumecontroller.TaskCompleter)2 NullTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.NullTaskCompleter)2 SRDFChangeCopyModeTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFChangeCopyModeTaskCompleter)2 SRDFTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFTaskCompleter)2 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)2 URI (java.net.URI)2 ArrayList (java.util.ArrayList)2