use of com.emc.storageos.volumecontroller.impl.smis.srdf.collectors.BrokenSynchronizationsOnlyFilter in project coprhd-controller by CoprHD.
the class SRDFOperations method performEstablish.
public void performEstablish(StorageSystem system, Volume target, boolean refreshVolumeProperties, TaskCompleter completer) {
log.info("START performEstablish");
checkTargetHasParentOrFail(target);
ServiceError error = null;
try {
// refresh RDF group source provider, it is required after R2 snap/clone restore performed on target provider
RemoteDirectorGroup rdfGroup = dbClient.queryObject(RemoteDirectorGroup.class, target.getSrdfGroup());
StorageSystem sourceSystem = dbClient.queryObject(StorageSystem.class, rdfGroup.getSourceStorageSystemUri());
callEMCRefresh(helper, sourceSystem);
SRDFOperationContext establishCtx = getContextFactory(system).build(SRDFOperation.ESTABLISH, target);
establishCtx.appendFilters(new BrokenSynchronizationsOnlyFilter(utils));
establishCtx.perform();
if (refreshVolumeProperties) {
refreshTargetVolumeProperties(system, target);
}
} catch (Exception e) {
log.error("Failed to establish srdf link {}", target.getSrdfParent().getURI(), e);
error = SmisException.errors.jobFailed(e.getMessage());
} finally {
if (error == null) {
completer.ready(dbClient);
} else {
completer.error(dbClient, error);
}
}
}
use of com.emc.storageos.volumecontroller.impl.smis.srdf.collectors.BrokenSynchronizationsOnlyFilter in project coprhd-controller by CoprHD.
the class SRDFOperations method performRestore.
public void performRestore(StorageSystem system, Volume target, TaskCompleter completer) {
log.info("START performRestore");
checkTargetHasParentOrFail(target);
ServiceError error = null;
try {
SRDFOperationContext restoreCtx = getContextFactory(system).build(SRDFOperation.RESTORE, target);
restoreCtx.appendFilters(new BrokenSynchronizationsOnlyFilter(utils));
restoreCtx.perform();
refreshTargetVolumeProperties(system, target);
} catch (Exception e) {
log.error("Failed to restore srdf link {}", target.getSrdfParent().getURI(), e);
error = SmisException.errors.jobFailed(e.getMessage());
} finally {
if (error == null) {
completer.ready(dbClient);
} else {
completer.error(dbClient, error);
}
}
}
Aggregations