----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60886/ -----------------------------------------------------------
(Updated July 17, 2017, 9:26 p.m.) Review request for Ambari, Andrii Tkach, Dmytro Grinenko, Jonathan Hurley, Sumit Mohanty, and Sid Wagle. Bugs: AMBARI-21481 https://issues.apache.org/jira/browse/AMBARI-21481 Repository: ambari 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 Diffs (updated) ----- ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java 3c8686c ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/configuration/spark-javaopts-properties.xml a197e34 ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/SPARK2/configuration/spark2-javaopts-properties.xml f8d50fc ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/SPARK2/metainfo.xml bf75f47 ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/configuration/spark-javaopts-properties.xml 77a7282 Diff: https://reviews.apache.org/r/60886/diff/5/ Changes: https://reviews.apache.org/r/60886/diff/4-5/ Testing ------- Verified on local cluster. Unit test for UpgradeCatalog252Test.java passed. Thanks, Alejandro Fernandez