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

Upgrading IOP cluster with Spark2 to Ambari 2.5.2 fails on start because config mapping spark2-javaopts-properties is never selected

    XMLWordPrintableJSON

Details

    Description

      STR:

      • Install BigInsights 4.2.5 with Spark2
      • Upgrade to Ambari 2.5.2
      • Start Ambari, which will fail in the DB consistency check
      2017-07-07 01:07:01,881 ERROR - You have non selected configs: spark2-javaopts-properties for service SPARK2 from cluster c1!
      

      Looks like this config is never selected,

      ambari=> SELECT sc.service_name, sc.version, sc.user_name, TO_TIMESTAMP(sc.create_timestamp/1000), sc.stack_id, sc.note,
      c.version AS type_version, c.version_tag, c.type_name, c.stack_id, TO_TIMESTAMP(c.create_timestamp/1000) AS clusterconfig_created,
      TO_TIMESTAMP(ccm.create_timestamp/1000) AS clusterconfigmapping_created, ccm.selected, ccm.user_name
      FROM serviceconfig sc JOIN serviceconfigmapping m ON sc.service_config_id = m.service_config_id
      JOIN clusterconfig c ON m.config_id = c.config_id
      JOIN clusterconfigmapping ccm ON c.type_name = ccm.type_name AND c.version_tag = ccm.version_tag
      WHERE sc.service_name = 'SPARK2' and c.type_name = 'spark2-javaopts-properties'
      ORDER BY sc.version, c.type_name;
       service_name | version |   user_name    |      to_timestamp      | stack_id |               note                | type_version | version_tag |         type_name          | stack_id | clusterconfig_created  | clusterconfigmapping_created | selected | user_name
      --------------+---------+----------------+------------------------+----------+-----------------------------------+--------------+-------------+----------------------------+----------+------------------------+------------------------------+----------+-----------
       SPARK2       |       1 | admin          | 2017-07-11 20:17:01+00 |        3 | Initial configurations for Spark2 |            1 | version1    | spark2-javaopts-properties |        3 | 2017-07-11 20:17:00+00 | 2017-07-11 20:17:01+00       |        0 | admin
       SPARK2       |       2 | ambari-upgrade | 2017-07-13 20:33:50+00 |        3 |                                   |            1 | version1    | spark2-javaopts-properties |        3 | 2017-07-11 20:17:00+00 | 2017-07-11 20:17:01+00       |        0 | admin
      (2 rows)
      

      This is because the config type has a single config with an empty value, so perhaps UI never selects it.

      <configuration supports_final="true">
        <property>
          <name>content</name>
          <description>Spark2-javaopts-properties</description>
          <value> </value>
          <on-ambari-upgrade add="true"/>
        </property>
      </configuration>
      

      Fix will be for Ambari 2.5.2 upgrade to select exactly once config for each config type if none are selected.
      The only config type to hit this issue is spark2-javaopts-properties

      Attachments

        1. AMBARI-21481.patch
          10 kB
          Alejandro Fernandez

        Issue Links

          Activity

            People

              afernandez Alejandro Fernandez
              afernandez Alejandro Fernandez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: