Search in sources :

Example 1 with UpgradeFailureInfo

use of com.emc.storageos.coordinator.client.model.UpgradeFailureInfo in project coprhd-controller by CoprHD.

the class MigrationHandlerImpl method removeMigrationFailInfoIfExist.

private void removeMigrationFailInfoIfExist() {
    UpgradeFailureInfo failInfo = coordinator.queryRuntimeState(Constants.UPGRADE_FAILURE_INFO, UpgradeFailureInfo.class);
    if (failInfo != null) {
        log.info("remove upgrade fail information from zk.");
        coordinator.removeRuntimeState(Constants.UPGRADE_FAILURE_INFO);
    }
}
Also used : UpgradeFailureInfo(com.emc.storageos.coordinator.client.model.UpgradeFailureInfo)

Example 2 with UpgradeFailureInfo

use of com.emc.storageos.coordinator.client.model.UpgradeFailureInfo in project coprhd-controller by CoprHD.

the class MigrationHandlerImpl method persistMigrationFailInfo.

private void persistMigrationFailInfo(Date startTime, Exception e) {
    schemaUtil.setMigrationStatus(MigrationStatus.FAILED);
    UpgradeFailureInfo failure = new UpgradeFailureInfo();
    failure.setVersion(targetVersion);
    failure.setStartTime(startTime);
    if (e instanceof MigrationCallbackException) {
        failure.setSuggestion(e.getMessage());
    }
    failure.setMessage(String.format("Upgrade to %s failed:%s", targetVersion, e.getClass().getName()));
    List<String> callStack = new ArrayList<String>();
    for (StackTraceElement t : e.getStackTrace()) {
        callStack.add(t.toString());
    }
    failure.setCallStack(callStack);
    coordinator.persistRuntimeState(Constants.UPGRADE_FAILURE_INFO, failure);
}
Also used : MigrationCallbackException(com.emc.storageos.svcs.errorhandling.resources.MigrationCallbackException) UpgradeFailureInfo(com.emc.storageos.coordinator.client.model.UpgradeFailureInfo)

Example 3 with UpgradeFailureInfo

use of com.emc.storageos.coordinator.client.model.UpgradeFailureInfo in project coprhd-controller by CoprHD.

the class Maintenance method fail.

public static void fail(String targetUrl) {
    CoordinatorClient coordinatorClient = StorageOsPlugin.getInstance().getCoordinatorClient();
    UpgradeFailureInfo failureInfo = coordinatorClient.queryRuntimeState(Constants.UPGRADE_FAILURE_INFO, UpgradeFailureInfo.class);
    Logger.info("UpgradeFailureInfo=%s", failureInfo);
    render(failureInfo);
}
Also used : CoordinatorClient(com.emc.storageos.coordinator.client.service.CoordinatorClient) UpgradeFailureInfo(com.emc.storageos.coordinator.client.model.UpgradeFailureInfo)

Aggregations

UpgradeFailureInfo (com.emc.storageos.coordinator.client.model.UpgradeFailureInfo)3 CoordinatorClient (com.emc.storageos.coordinator.client.service.CoordinatorClient)1 MigrationCallbackException (com.emc.storageos.svcs.errorhandling.resources.MigrationCallbackException)1