From efde227b9d0180122362133a750c6b322601c883 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 19 Jul 2007 20:28:20 +0000
Subject: [PATCH] This initial implementation lays most of the groundwork necessary for signaling information and actions to the user during upgrade and reversion. However the only public effect this code has on the current upgrade tool is an informational dialog dialog if an upgrade is attempted from a build prior to one of the issues (2049, 1582, 890).
---
opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java b/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
index a54bcac..8cfd0f8 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
@@ -725,7 +725,7 @@
ZipExtractor extractor;
try {
LOG.log(Level.INFO, "Waiting for Java Web Start jar download");
- waitForLoader(15); // TODO: ratio
+ waitForLoader(15);
LOG.log(Level.INFO, "Downloaded build file");
String zipName = WebStartDownloader.getZipFileName();
InputStream in =
@@ -1470,7 +1470,6 @@
private void insureUpgradability() throws ApplicationException {
BuildInformation currentVersion;
BuildInformation newVersion;
-
try {
currentVersion = getInstallation().getBuildInformation();
} catch (ApplicationException e) {
@@ -1488,14 +1487,19 @@
LOG.log(Level.INFO, "error getting build information for " +
"staged installation", e);
throw ApplicationException.createFileSystemException(
- getMsg("error-determining-upgrade-build"), e); }
-
- UpgradeOracle uo = new UpgradeOracle(currentVersion, newVersion);
- if (!uo.isSupported()) {
- throw new ApplicationException(ApplicationException.Type.APPLICATION,
- uo.getLocalizedSummaryMessage(), null);
+ getMsg("error-determining-upgrade-build"), e);
}
+ UpgradeOracle uo = new UpgradeOracle(
+ userInteraction(), currentVersion, newVersion);
+ uo.notifyUser();
+ if (uo.noServerStartFollowingOperation()) {
+ // Some issue dicatates that we don't try and restart the server
+ // after this operation. It may be that the databases are no
+ // longer readable after the upgrade or something equally earth
+ // shattering.
+ getUserData().setStartServer(false);
+ }
}
private Installation getStagedInstallation()
--
Gitblit v1.10.0