Search in sources :

Example 1 with ExportDeregisterInitiatorCompleter

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

the class VnxMaskingOrchestrator method increaseMaxPaths.

@Override
public void increaseMaxPaths(Workflow workflow, StorageSystem storageSystem, ExportGroup exportGroup, ExportMask exportMask, List<URI> newInitiators, String token) throws Exception {
    // Increases the MaxPaths for a given ExportMask if it has Initiators
    // that are not currently zoned to ports. The method
    // generateExportMaskAddInitiatorsWorkflow will
    // allocate additional ports for the newInitiators to be processed.
    // These will be zoned and then subsequently added to the MaskingView /
    // ExportMask.
    Map<URI, List<URI>> zoneMasksToInitiatorsURIs = new HashMap<URI, List<URI>>();
    zoneMasksToInitiatorsURIs.put(exportMask.getId(), newInitiators);
    String deregisterInitiatorStep = workflow.createStepId();
    ExportTaskCompleter completer = new ExportDeregisterInitiatorCompleter(exportGroup.getId(), exportMask.getId(), newInitiators, deregisterInitiatorStep);
    // These new initiators will be first removed from the storagesystem for
    // the following reason:
    // There seems to be a bug in provider or some other place for VNX only where
    // in a case when initiators are already registered and associated with the
    // storage groups, when these initiators are zoned and registered again
    // they don't get associated with the storage groups and hence these
    // new initiators don't have connectivity to the volumes. Thus it is done
    // this way to ensure newly zoned initiators have connectivity to volumes.
    String removeInitiatorStep = generateExportMaskRemoveInitiatorsWorkflow(workflow, null, storageSystem, exportGroup, exportMask, null, newInitiators, true, completer);
    String zoningStep = generateZoningAddInitiatorsWorkflow(workflow, removeInitiatorStep, exportGroup, zoneMasksToInitiatorsURIs);
    generateExportMaskAddInitiatorsWorkflow(workflow, zoningStep, storageSystem, exportGroup, exportMask, newInitiators, null, token);
}
Also used : ExportTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportTaskCompleter) ExportDeregisterInitiatorCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportDeregisterInitiatorCompleter) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) List(java.util.List) URI(java.net.URI)

Aggregations

ExportDeregisterInitiatorCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportDeregisterInitiatorCompleter)1 ExportTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportTaskCompleter)1 URI (java.net.URI)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1