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

[PluggableStackDefinition] RU: Pre-req checks while performing upgrade fail with 'Reason: Unexpected server error happened'

    XMLWordPrintableJSON

    Details

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

      Description

      on started "Perform Upgrade" all pre-req checks fail with error "Reason: Unexpected server error happened".

      18 Aug 2015 17:38:01,947 ERROR [qtp-client-20] CheckHelper:72 - Check CONFIG_MERGE failed
      java.lang.RuntimeException: StackId with different names cannot be compared.
              at org.apache.ambari.server.state.StackId.compareTo(StackId.java:131)
              at org.apache.ambari.server.checks.AbstractCheckDescriptor.isApplicable(AbstractCheckDescriptor.java:103)
              at org.apache.ambari.server.checks.ConfigurationMergeCheck.isApplicable(ConfigurationMergeCheck.java:54)
              at org.apache.ambari.server.state.CheckHelper.performChecks(CheckHelper.java:57)
              at org.apache.ambari.server.controller.internal.PreUpgradeCheckResourceProvider.getResources(PreUpgradeCheckResourceProvider.java:144)
              at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ExtendedResourceProviderWrapper.queryForResources(ClusterControllerImpl.java:945)
              at org.apache.ambari.server.controller.internal.ClusterControllerImpl.getResources(ClusterControllerImpl.java:132)
              at org.apache.ambari.server.api.query.QueryImpl.doQuery(QueryImpl.java:482)
              at org.apache.ambari.server.api.query.QueryImpl.queryForResources(QueryImpl.java:381)
              at org.apache.ambari.server.api.query.QueryImpl.execute(QueryImpl.java:217)
              at org.apache.ambari.server.api.handlers.ReadHandler.handleRequest(ReadHandler.java:68)
              at org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:135)
              at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:105)
              at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:74)
              at org.apache.ambari.server.api.services.PreUpgradeCheckService.getPreUpgradeChecks(PreUpgradeCheckService.java:62)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
      

      This is because in ambari/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java the min source stack is hardcoded to HDP-2.2 and hence HDP-2.2 is compared to generated stack leading to the above exception. We need to make this config driven

        /**
         * Gets the earliest stack that the upgrade check is compatible with. By
         * default, all checks will return {@link #STACK_HDP_22} since this is the
         * first version of HDP that supports automated upgrades.
         *
         * @return the earliest stack that the upgrade check is compatible with, or
         *         {@code null} for all.
         */
        public StackId getSourceStack(){
          return STACK_HDP_22;
        }
      

        Attachments

        1. AMBARI-12821.patch
          6 kB
          Jayush Luniya

          Issue Links

            Activity

              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: