mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

david_page
24.07.2007 5ffb9dbec34a417654ddf13288a200c1a7c969ca
Issue 466 preparation.

Secure replication depends on ADS containing at least the instance-to-be-initialized's instance key public-key certificate in the ADS-based truststore because the existing replication domain server requires it to "trust" the new server. (The new server trusts the domain server by some future ADSContext code that will fetch the domain host's public-key certificate and write it into the new server's truststore backend - all via LDAP.)

Hence, this change reverses the invocation order of Installer.initializeSuffixes and Installer.updateADS so that the latter is now run first (but still subsequent to Installer.configureReplication). Note that Installer.updateADS does require Installer.configureReplication to have been run, since it configures replication for and initializes "cn=admin data".

M src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
M src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java

Tests:

In addition to the precommit target, I've run the following setup scenarios using the OfflineInstaller:

1) Setup standalone server with data; setup new server as part of existing replication. Then the new server setup configures replication, ADS, and initializes suffixes on both instances.

2) Setup initial replicated server with data; setup new server as part of existing replication.

I'm not sure how to test the WebStartInstaller, but the code and changes are identical to the OfflineInstaller, so perhaps it is ok.

--
Thanks to Josu for the review.

2 files modified
58 ■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java 28 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java 30 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
@@ -131,6 +131,14 @@
        checkAbort();
      }
      if (mustCreateAds())
      {
        notifyListeners(getTaskSeparator());
        setCurrentProgressStep(InstallProgressStep.CONFIGURING_ADS);
        updateADS();
        checkAbort();
      }
      if (mustInitializeSuffixes())
      {
        notifyListeners(getTaskSeparator());
@@ -140,14 +148,6 @@
        checkAbort();
      }
      if (mustCreateAds())
      {
        notifyListeners(getTaskSeparator());
        setCurrentProgressStep(InstallProgressStep.CONFIGURING_ADS);
        updateADS();
        checkAbort();
      }
      if (mustStop())
      {
        notifyListeners(getTaskSeparator());
@@ -384,6 +384,12 @@
      totalTime += hmTime.get(InstallProgressStep.CONFIGURING_REPLICATION);
    }
    if (mustCreateAds())
    {
      totalTime += hmTime.get(InstallProgressStep.CONFIGURING_ADS);
      steps.add(InstallProgressStep.CONFIGURING_ADS);
    }
    if (mustInitializeSuffixes())
    {
      totalTime += hmTime.get(
@@ -391,12 +397,6 @@
      steps.add(InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES);
    }
    if (mustCreateAds())
    {
      totalTime += hmTime.get(InstallProgressStep.CONFIGURING_ADS);
      steps.add(InstallProgressStep.CONFIGURING_ADS);
    }
    if (mustStop())
    {
      totalTime += hmTime.get(InstallProgressStep.STOPPING_SERVER);
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
@@ -186,6 +186,15 @@
        checkAbort();
      }
      if (mustCreateAds())
      {
        notifyListeners(getTaskSeparator());
        setCurrentProgressStep(InstallProgressStep.CONFIGURING_ADS);
        updateADS();
        checkAbort();
      }
      if (mustInitializeSuffixes())
      {
        notifyListeners(getTaskSeparator());
@@ -196,15 +205,6 @@
        checkAbort();
      }
      if (mustCreateAds())
      {
        notifyListeners(getTaskSeparator());
        setCurrentProgressStep(InstallProgressStep.CONFIGURING_ADS);
        updateADS();
        checkAbort();
      }
      if (mustStop())
      {
        notifyListeners(getTaskSeparator());
@@ -366,6 +366,12 @@
      totalTime += hmTime.get(InstallProgressStep.CONFIGURING_REPLICATION);
    }
    if (mustCreateAds())
    {
      totalTime += hmTime.get(InstallProgressStep.CONFIGURING_ADS);
      steps.add(InstallProgressStep.CONFIGURING_ADS);
    }
    if (mustInitializeSuffixes())
    {
      totalTime += hmTime.get(
@@ -373,12 +379,6 @@
      steps.add(InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES);
    }
    if (mustCreateAds())
    {
      totalTime += hmTime.get(InstallProgressStep.CONFIGURING_ADS);
      steps.add(InstallProgressStep.CONFIGURING_ADS);
    }
    if (mustStop())
    {
      totalTime += hmTime.get(InstallProgressStep.STOPPING_SERVER);