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

RPM based package upgrades fail if rpm --prefix or an --instancePath is used for installation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Dev backlog
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 7.0.0, 7.0.1, 7.1.0
    • Fix Version/s: None
    • Component/s: upgrade
    • Labels:
      None
    • Environment:
      Linux with the RPM Package.

      Description

      Upgrades of RPM-based installs will always fail if setup with an --instancePath or the RPM is installed to the system using a --prefix other than /opt/opendj, which is hardcoded.

      While the documentation states the rpm package "Installs server files in the /opt/opendj directory", the following is true.

      • The DS supports set up using an --instancePath to separate the binaries from the data.
      • The RPM facility allows a package to be installed in any location.
      • The DS upgrade tool always looks for the instance to be located in /opt/opendj

      Reproduction steps: using --instancePath

      1. Install the RPM per the install guide; rpm --install DS-7.0.1-1.noarch.rpm
      2. Setup the DS; ./setup --instancePath /opt/ds1
      3. Upgrade: rpm --upgrade opendj-7.1.0-1.noarch.rpm

      While the binary files are in /opt/opendj, the instance including the config file path are installed into /opt/ds1.

      [root@opendj]# rpm --upgrade opendj-7.1.0-1.noarch.rpm
      Post Install - upgrade install
      Checking config file
      ls: cannot access /opt/opendj/config/config.ldif: No such file or directory
      Instance is not configured. Upgrade aborted.
      warning: %post(opendj-7.1.0-1.noarch) scriptlet failed, exit status 255
      Pre Uninstall - upgrade uninstall
      Post Uninstall - upgrade uninstall
      

      Reproduction steps: using rpm --prefix=<path>

      1. Install the RM with a prefix; rpm --prefix /opt/ds1 --install DS-7.0.1-1.noarch.rpm
      2. Setup the DS; ./setup
      3. Upgrade: rpm --prefix /opt/ds1 --upgrade opendj-7.1.0-1.noarch.rpm
      [root@opendj]# rpm --upgrade --prefix=/opt/ds1 opendj-7.1.0-1.noarch.rpm
      Post Install - upgrade install
      Checking config file
      ls: cannot access /opt/opendj/config/config.ldif: No such file or directory
      Instance is not configured. Upgrade aborted.
      warning: %post(opendj-7.1.0-1.noarch) scriptlet failed, exit status 255
      Pre Uninstall - upgrade uninstall
      Post Uninstall - upgrade uninstall
      

      A workaround would be to stop the DS and relocate all the --instancePath files into /opt/opendj, but this is not reasonable.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            lee.trujillo Lee Trujillo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: