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

Upgrades Must Track To/From Repository Versions Instead of Strings

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.5.2
    • 2.5.2
    • None
    • None

    Description

      When creating an upgrade in Ambari 2.5.x, the request appears as follows:

      POST api/v1/clusters/c1/upgrades
      {
        "Upgrade": {
          "repository_version": "2.6.0.0-334",
          "skip_failures": "true",
          "skip_service_check_failures": "true",
          "skip_prerequisite_checks": "true",
          "upgrade_type": "NON_ROLLING",
          "direction": "UPGRADE"
        }
      }
      

      The only identifier for the repository is the repo version. This forces the query to assume that the repository has the same name as the repository currently installed for the cluster. When going between stack vendors, this is incorrect:

      STR:

      • Install BigInsights 4.2.0 or 4.2.5
      • Upgrade to Ambari 2.5.2
      • Register HDP 2.6 and try to upgrade

      The backend will look for BigInsights-2.6.0.0-1234 instead of HDP-2.6.0.0-1234. A quick workaround is to fallback to a version-only search when the repository is not found.

      The fix for this is to allow the web client to pass the stack name in addition to the version. A repository ID can also be specified instead of the stack name/version.

      Additionally, the upgrade itself must track the to/from repo versions instead of strings:

      CREATE TABLE upgrade (
        upgrade_id BIGINT NOT NULL,
        cluster_id BIGINT NOT NULL,
        request_id BIGINT NOT NULL,
        from_repo_version_id BIGINT NOT NULL,
        to_repo_version_id BIGINT NOT NULL,
        ...
      

      Attachments

        1. AMBARI-21358.patch
          160 kB
          Jonathan Hurley

        Issue Links

          Activity

            People

              jonathanhurley Jonathan Hurley
              jonathanhurley Jonathan Hurley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: