Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-4356

"fisheyectl.sh restore" removes some database connection attributes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.9.0
    • 2.8.0
    • Server administration
    • None

    Description

      When restoring an OnDemand FishEye backup into a BTF FishEye 2.8.0 installation, in config.xml, the driver and the driverSource attributes in the <connection> element were removed. These attributes contain correct data derived from the OnDemand instance if the customer chooses to use PostgreSQL as the database for their BTF installation. When the imported FishEye was started using this config.xml, it complained that the JDBC driver was not found.

      My expectation is that these 2 attributes should be retained if other command line options indicate that the customer is using PostgreSQL as database. Further discussions about the scenario can be found here: https://sdog.jira.com/wiki/display/FCBM/FECRU+Backup+Requirements?focusedCommentId=61931646#comment-61931646

      These are the steps I followed:

      1. Decompress a fisheye-2.8.0.zip
      2. Prepare a PostgreSQL database for the FishEye installation:
        zxu@zxu-desktop:~/tmp/20121107083444$ sudo su - postgres
        postgres@zxu-desktop:~$ psql 
        psql (9.1.5)
        Type "help" for help.
        
        postgres=# create database crucible_new ENCODING 'UTF-8' OWNER fisheye;
        CREATE DATABASE
        postgres=# grant all on database crucible_new to fisheye;
        GRANT
        postgres=#
        
      3. Import the OnDemand backup using the following command line:
        fecru-2.8.0/bin/fisheyectl.sh restore --username fisheye --password fisheye --jdbcurl jdbc:postgresql://localhost:5432/crucible_new --dbtype postgresql --file ./FeCru-backup-20121105.zip
        
      4. Compare the config.xml from the OnDemand export and the one living in BTF FishEye, and notice the following differences:
        <         <connection driver="org.postgresql.Driver" jdbcurl="jdbc:postgresql://localhost:5432/fisheye" username="fisheye" password="eK4dUPIB9a" driverSource="bundled"/>
        ---
        >         <connection jdbcurl="jdbc:postgresql://localhost:5432/crucible_new" username="fisheye" password="fisheye"/>
        
      5. Try to start the FishEye instance but it does not start, complaining missing JDBC driver.

      Here are the relevant files / logs:

      Attachments

        1. config.xml.post-import
          17 kB
        2. FeCru-backup-20121105.zip
          31 kB
        3. fisheye.out
          37 kB
        4. restore.out
          59 kB

        Activity

          People

            lpater Lukasz Pater
            zxu@atlassian.com Zhuang Xu (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 19m
                19m