Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-22723

Ambari Upgrade failed in case if database have no cluster_version table already. The issue with idempotence

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.6.1
    • 2.6.2
    • ambari-server
    • None

    Description

      AMBARI-21728 and AMBARI-22469 make the upgrade broken in case of several upgrade tries, failing to follow the Idempotent upgrade paradigm.

      Issue is with:

      protected void executeDDLUpdates() throws AmbariException, SQLException {
      Integer currentVersionID = getCurrentVersionID();    <----------------------
      dropBrokenFK();
      updateServiceComponentDesiredStateTable(currentVersionID); <----------------------
      updateServiceDesiredStateTable(currentVersionID); <----------------------
      addSelectedCollumsToClusterconfigTable();
      updateHostComponentDesiredStateTable();
      updateHostComponentStateTable();
      dropStaleTables();  <----------------------
      updateUpgradeTable();
      createUpgradeHistoryTable();
      updateRepositoryVersionTable();
      renameServiceDeletedColumn();
      addLegacyColumn();
      expandUpgradeItemItemTextColumn();
      addViewUrlPKConstraint();
      removeStaleConstraints();
      }
      

      getCurrentVersionID() trying to query non-existing table and failing whole upgrade

      Attachments

        1. AMBARI-22723.patch
          3 kB
          Dmitry Lysnichenko

        Issue Links

          Activity

            People

              dmitriusan Dmitry Lysnichenko
              dmitriusan Dmitry Lysnichenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: