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);
}
}
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);
}
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);
}
Aggregations