Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-20828

UPGRADE Lifecycle steps are executed when database is frozen

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.18.0
    • Fix Version/s: None
    • Component/s: Upgrade
    • Labels:
    • Notability:
      3

      Description

      A user changed a 3.17.0 database to read-only, and then shut down the server.

      The user then started up 3.18.0, which logged these messages:

      2019-08-07 01:03:40,277+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.orient.internal.freeze.DatabaseFreezeServiceImpl - Restoring database frozen state on startup
      2019-08-07 01:03:40,286+0000 WARN [FelixStartLevel] *SYSTEM org.sonatype.nexus.orient.internal.freeze.DatabaseFreezeServiceImpl - Database was frozen by USER_INITIATED process 'username' at 2019-08-06T23:16:16.016Z
      2019-08-07 01:03:40,286+0000 WARN [FelixStartLevel] *SYSTEM org.sonatype.nexus.orient.internal.freeze.DatabaseFreezeServiceImpl - Databases must be unfrozen manually
       

      However the upgrade steps in the UPGRADE lifecycle stage tried to execute despite this.

      2019-08-07 01:03:43,356+0000 INFO  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Start UPGRADE
      2019-08-07 01:03:43,476+0000 INFO  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - 
      - - - - - - - - - - - - - - - - - - - - - - - - -
      Begin upgrade
      - - - - - - - - - - - - - - - - - - - - - - - - -
      2019-08-07 01:03:43,477+0000 INFO  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - Checkpoint component
      2019-08-07 01:04:24,679+0000 INFO  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - 
      - - - - - - - - - - - - - - - - - - - - - - - - -
      Apply upgrade
      - - - - - - - - - - - - - - - - - - - - - - - - -
      2019-08-07 01:04:24,682+0000 INFO  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - Upgrade component from 1.13 to 1.14
      2019-08-07 01:04:24,710+0000 WARN  [FelixStartLevel]  *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - Problem upgrading component from 1.13 to 1.14
      com.orientechnologies.common.concur.lock.OModificationOperationProhibitedException: Modification requests are prohibited
      	DB name="component"
      
      

      Expected

      A read-only state is a critical server state and is exceptional.

      If a different NXRM version is started against databases that are not in normal write state or are from a previous version, then the server should immediately stop with a message at ERROR level stating why, asking the user to startup with the correct version first.

      Any UPGRADE steps should never be executed if the state of the server is not in normal operating state ( ie. not read-only ). Relying on database rollback operations is not adequate - not all steps involve database, and sometimes the original databases are in inconsistent state in the first place and the user could be trying to upgrade to resolve the problem.

      Do not rely on upgrade database operations being rolled back reliably or any other.

       

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch Peter Lynch
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title