use of com.emc.storageos.db.exceptions.RetryableDatabaseException in project coprhd-controller by CoprHD.
the class AbstractDiscoveredSystemController method queueTask.
protected void queueTask(DbClient dbClient, Class<? extends DiscoveredSystemObject> systemClazz, Dispatcher dispatcher, String methodName, Object... args) {
final URI systemURI = (URI) args[0];
_log.info("System {} received RMI request {}.", systemURI, methodName);
try {
// 1. select target device
final DiscoveredSystemObject device = dbClient.queryObject(systemClazz, systemURI);
final Controller controller = lookupDeviceController(device);
// 2. queue request
dispatcher.queue(device.getId(), device.getSystemType(), controller, methodName, args);
} catch (RetryableDatabaseException e) {
if (e.getServiceCode() == ServiceCode.DBSVC_CONNECTION_ERROR) {
// netflix curator ConnectionException is not serializable
// and thus should not be sent back to rmi client.
_log.error("Failed to queue task due to dbsvc disconnected. Error: ", e);
throw DatabaseException.retryables.connectionFailed();
}
throw e;
}
}
use of com.emc.storageos.db.exceptions.RetryableDatabaseException in project coprhd-controller by CoprHD.
the class BlockControllerImpl method pauseNativeContinuousCopies.
@Override
public void pauseNativeContinuousCopies(URI storage, List<URI> mirrors, Boolean sync, String opId) throws InternalException {
try {
// Direct RMI call to expedite this call without any potential distribute-Q delay
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage);
Controller controller = lookupDeviceController(storageSystem);
BlockController blkcontroller = (BlockController) controller;
blkcontroller.pauseNativeContinuousCopies(storage, mirrors, sync, opId);
} catch (RetryableDatabaseException e) {
if (e.getServiceCode() == ServiceCode.DBSVC_CONNECTION_ERROR) {
// netflix curator ConnectionException is not serializable
// and thus should not be sent back to rmi client.
_log.error("Failed to queue task due to dbsvc disconnected. Error: {}", e.getMessage());
_log.error(e.getMessage(), e);
throw DatabaseException.retryables.connectionFailed();
}
throw e;
}
}
use of com.emc.storageos.db.exceptions.RetryableDatabaseException in project coprhd-controller by CoprHD.
the class BlockControllerImpl method activateFullCopy.
@Override
public void activateFullCopy(URI storage, List<URI> fullCopy, String opId) {
try {
// Direct RMI call to expedite this call without any potential distribute-Q delay
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage);
Controller controller = lookupDeviceController(storageSystem);
BlockController blkcontroller = (BlockController) controller;
blkcontroller.activateFullCopy(storage, fullCopy, opId);
} catch (RetryableDatabaseException e) {
if (e.getServiceCode() == ServiceCode.DBSVC_CONNECTION_ERROR) {
// netflix curator ConnectionException is not serializable
// and thus should not be sent back to rmi client.
_log.error("Failed to queue task due to dbsvc disconnected. Error: {}", e.getMessage());
_log.error(e.getMessage(), e);
throw DatabaseException.retryables.connectionFailed();
}
throw e;
}
}
use of com.emc.storageos.db.exceptions.RetryableDatabaseException in project coprhd-controller by CoprHD.
the class BlockControllerImpl method activateSnapshot.
@Override
public void activateSnapshot(URI storage, List<URI> snapshotList, String opId) throws InternalException {
try {
// Direct RMI call to expedite this call without any potential distribute-Q delay
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage);
Controller controller = lookupDeviceController(storageSystem);
BlockController blkcontroller = (BlockController) controller;
blkcontroller.activateSnapshot(storage, snapshotList, opId);
} catch (RetryableDatabaseException e) {
if (e.getServiceCode() == ServiceCode.DBSVC_CONNECTION_ERROR) {
// netflix curator ConnectionException is not serializable
// and thus should not be sent back to rmi client.
_log.error("Failed to queue task due to dbsvc disconnected. Error: {}", e.getMessage());
_log.error(e.getMessage(), e);
throw DatabaseException.retryables.connectionFailed();
}
throw e;
}
}
use of com.emc.storageos.db.exceptions.RetryableDatabaseException in project coprhd-controller by CoprHD.
the class BlockControllerImpl method checkSyncProgress.
@Override
public Integer checkSyncProgress(URI storage, URI source, URI target, String opId) {
try {
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage);
Controller controller = lookupDeviceController(storageSystem);
BlockController blkcontroller = (BlockController) controller;
return blkcontroller.checkSyncProgress(storage, source, target, opId);
} catch (RetryableDatabaseException e) {
if (e.getServiceCode() == ServiceCode.DBSVC_CONNECTION_ERROR) {
// netflix curator ConnectionException is not serializable
// and thus should not be sent back to rmi client.
_log.error("Failed to queue task due to dbsvc disconnected. Error: {}", e.getMessage());
_log.error(e.getMessage(), e);
throw DatabaseException.retryables.connectionFailed();
}
throw e;
}
}
Aggregations