Details

      Description

      When upgrading from 6.1.30, default (and unused in our case) sharding settings breaks the upgrade.

      In 6.1, we have the following in portal.properties:

      #

      1. Set the database that is to be used for the default company and globally
      2. used tables in a sharded environment.
        #
        shard.default.name=default

      which by default populates the Shard table in the database with that name, once per companyId. In 7, we have removed that property from portal.properties, so we get the following exception:

      09:58:23,198 INFO  [main][UpgradeProcess:65] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 12912524ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.RuntimeException: The property "shard.default.name" is not set in portal.properties. Please specify a default shard name from: default, default, default.
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:59)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:184)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:152)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:134)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:145)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:67)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.RuntimeException: The property "shard.default.name" is not set in portal.properties. Please specify a default shard name from: default, default, default.
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:59)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:83)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:100)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:56)
      	... 7 more
      Caused by: java.lang.RuntimeException: The property "shard.default.name" is not set in portal.properties. Please specify a default shard name from: default, default, default.
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:69)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.doUpgrade(UpgradeSharding.java:153)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:56)
      	... 10 more
      

      The solution, I think, is to just add that property back into the 7.0 portal-ext.properties as we do the upgrade, however it would be nice if it would figure out that you are using default sharding and just assume those names are correct? Or add those properties back just for the upgrade? Something to make the process more smooth for sure.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              haoliang.wu Haoliang Wu (Inactive)
              Reporter:
              brett.swaim Brett Swaim
              Participants of an Issue:
              Recent user:
              Michael Saechang
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 24 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 Beta 7