Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-6793

upgrade tool shouldn't fail with exception when doing data only upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: devops, upgrade
    • Labels:
    • Environment:
      minikube v1.4.0 on Linuxmint 19

      Description

      When I played with ds-empty image and gitops flow I noticed that data version is old (6.0.0) because I didn't have var directory locally with data.version.

      I noticed this by running setup-profile:

      forgerock@0a77b78825b4:/opt/opendj$ setup-profile --profile ds-evaluation
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/opt/opendj/lib/groovy.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
      WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      Configuring profile DS evaluation.....The 'DS evaluation' setup profile failed: Unable to import data (The OpenDJ
      binary version '7.0.0.4074ad9f05ce1573c03988a0f0bb7974770cd5bb' does not match
      the installed data version '6.0.0'. Please run 'upgrade --dataOnly' before
      continuing)
      

      so I tried the suggested upgrade --dataOnly and I hit the issue:

      forgerock@0a77b78825b4:/opt/opendj$ ./upgrade --dataOnly
      >>>> OpenDJ Upgrade Utility
       * OpenDJ data will be upgraded to version
       7.0.0.4074ad9f05ce1573c03988a0f0bb7974770cd5bb
       * See '/opt/opendj/logs/upgrade.log' for a detailed log of this operation
      >>>> Preparing to upgrade
        OpenDJ 6.5.0 changed the indexing algorithm for replication metadata. Its
        index must be rebuilt which may take a long time; without a working index
        every server start will take longer than normal. Do you want to rebuild the
        index automatically at the end of the upgrade? (yes/no) [no]: yes
        OpenDJ 7.0.0 changed the indexing algorithm for TelephoneNumber equality and
        substring matching rules. All TelephoneNumber syntax based attribute indexes
        must be rebuilt which may take a long time. Do you want to rebuild the
        indexes automatically at the end of the upgrade? (yes/no) [no]: yes
        The upgrade is ready to proceed. Do you wish to continue? (yes/no) [yes]: yes
      >>>> Performing upgrade
        Removing 'ds-task-backup-all' attribute from backup tasks...........   100%     
        Archiving concatenated schema.......................................   100%     
       ** 
       An error occurred while performing an upgrade task: IllegalArgumentException:
       totalWork must be a positive number (Reject.java:183 ProgressMonitor.java:76
       UpgradeTasks.java:1934 Upgrade.java:1183 UpgradeCli.java:272 Utils.java:961
       Utils.java:938 UpgradeCli.java:129)
       * See '/opt/opendj/logs/upgrade.log' for a detailed log of this operation
      

      The upgrade tool shouldn't fail with such Exception.

      Steps to reproduce:
      1. Create custom docker image with following file:

      FROM gcr.io/forgerock-io/ds-empty/docker-build:7.0.0-latest-postcommit
      COPY --chown=forgerock:root .  /opt/opendj/
      

      2. build the image

      docker build -t ds-test-image .
      

      3. run the container

      docker run --rm -it ds-test-image /bin/bash
      

      4. run the setup-profiles

      setup-profile --profile ds-evaluation
      

      5. run upgrade

      ./upgrade --dataOnly
      
      >>>> OpenDJ Upgrade Utility
       * OpenDJ data will be upgraded to version
       7.0.0.4074ad9f05ce1573c03988a0f0bb7974770cd5bb
       * See '/opt/opendj/logs/upgrade.log' for a detailed log of this operation
      ...
      

        Attachments

          Activity

            People

            Assignee:
            ondrej.fuchsik Ondrej Fuchsik
            Reporter:
            ondrej.fuchsik Ondrej Fuchsik
            Dev Assignee:
            Matthew Swift Matthew Swift
            QA Assignee:
            Ondrej Fuchsik Ondrej Fuchsik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: