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

Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.2
    • Component/s: ambari-server
    • Labels:
      None

      Description

      It is currently possible to execute an upgrade, bypassing the prerequisite endpoint checks entirely by using the upgrade endpoint API. For users that plan to use the APIs directly instead of the web client, this can present a problem if they have prerequisites for the upgrade that are not yet met.

      The upgrade endpoint should, by default, check the prerequisite endpoint to see if any checks have failed. If there is a failure, an error code should be returned and the upgrade will not begin. However, there can be an optional override to the API upgrade request to force the upgrade regardless of prerequisite checks:

      POST api/v1/clusters/c1/upgrades
      {
        "Upgrade": {
          "repository_version": "2.3.0.0-2545",
          "skip_prerequisite_checks": true
        }
      }
      

        Issue Links

          Activity

          Hide
          jluniya Jayush Luniya added a comment -

          Trunk
          commit d4182e13d199be5a3870e3649088a3bd682f5bb3
          Author: Jayush Luniya <jluniya@hortonworks.com>
          Date: Thu Sep 10 15:30:24 2015 -0700

          AMBARI-13018: Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya)

          Show
          jluniya Jayush Luniya added a comment - Trunk commit d4182e13d199be5a3870e3649088a3bd682f5bb3 Author: Jayush Luniya <jluniya@hortonworks.com> Date: Thu Sep 10 15:30:24 2015 -0700 AMBARI-13018 : Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya)
          Hide
          jluniya Jayush Luniya added a comment -

          Branch-2.1
          commit c83844339c5e5e1694f68a4baf840d8c545de454
          Author: Jayush Luniya <jluniya@hortonworks.com>
          Date: Thu Sep 10 15:30:24 2015 -0700

          AMBARI-13018: Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya)

          Show
          jluniya Jayush Luniya added a comment - Branch-2.1 commit c83844339c5e5e1694f68a4baf840d8c545de454 Author: Jayush Luniya <jluniya@hortonworks.com> Date: Thu Sep 10 15:30:24 2015 -0700 AMBARI-13018 : Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya)
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Ambari-branch-2.1 #513 (See https://builds.apache.org/job/Ambari-branch-2.1/513/)
          AMBARI-13018: Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya) (jluniya: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=c83844339c5e5e1694f68a4baf840d8c545de454)

          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PreUpgradeCheckResourceProvider.java
          • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderHDP22Test.java
          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Ambari-branch-2.1 #513 (See https://builds.apache.org/job/Ambari-branch-2.1/513/ ) AMBARI-13018 : Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya) (jluniya: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=c83844339c5e5e1694f68a4baf840d8c545de454 ) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PreUpgradeCheckResourceProvider.java ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderHDP22Test.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Ambari-trunk-Commit #3421 (See https://builds.apache.org/job/Ambari-trunk-Commit/3421/)
          AMBARI-13018: Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya) (jluniya: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d4182e13d199be5a3870e3649088a3bd682f5bb3)

          • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderHDP22Test.java
          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java
          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PreUpgradeCheckResourceProvider.java
          • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Ambari-trunk-Commit #3421 (See https://builds.apache.org/job/Ambari-trunk-Commit/3421/ ) AMBARI-13018 : Upgrade API Endpoint Should Rely on Prerequisite Endpoint Before Running (jluniya) (jluniya: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d4182e13d199be5a3870e3649088a3bd682f5bb3 ) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderHDP22Test.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PreUpgradeCheckResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java

            People

            • Assignee:
              jluniya Jayush Luniya
              Reporter:
              jluniya Jayush Luniya
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development