use of com.emc.storageos.Controller 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.Controller in project coprhd-controller by CoprHD.
the class ObjectControllerImpl method addUserSecretKey.
@Override
public ObjectUserSecretKey addUserSecretKey(URI storage, String userId, String secretKey) throws InternalException {
_log.debug("ObjectControllerImpl:addUserSecretKey start");
// Synchronous call than queuing
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage);
Controller controller = lookupDeviceController(storageSystem);
ObjectController objController = (ObjectController) controller;
return objController.addUserSecretKey(storage, userId, secretKey);
}
use of com.emc.storageos.Controller 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.Controller in project coprhd-controller by CoprHD.
the class BlockControllerImpl method setInitiatorAlias.
@Override
public void setInitiatorAlias(URI systemURI, URI initiatorURI, String initiatorAlias) throws Exception {
// Making a direct call to set alias.
Controller controller = lookupDeviceController();
BlockController blkcontroller = (BlockController) controller;
blkcontroller.setInitiatorAlias(systemURI, initiatorURI, initiatorAlias);
}
use of com.emc.storageos.Controller 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;
}
}
Aggregations