This is an automatically generated e-mail. To reply, visit:

(Updated July 20, 2016, 9:05 p.m.)

Review request for Ambari, Alexandr Antonenko, Di Li, Dmitro Lisnichenko, and 
Jonathan Hurley.

Bugs: AMBARI-17041

Repository: ambari


Currently, services can define properties in the XML configuration files that 
is flagged as type password:
        <description>Password to be masked</description>
and it will be masked properly in the UI as well as blueprint.

Custom property should also support this option so that password can be added 
as custom property and treat accordingly.

Proposed Design for the fix:
At present only the key-value information of the service properties is stored 
in the DB ("clusterconfig" table in the "config_data" column). 
The "config_attributes" column stores only certain attributes like "final" 
indicating the list of properties set with the Final flag = true. 
The information about the property-type (i.e PASSWORD, USER, GROUP, 
is extracted from the corresponding service's property file (e.g. 
hive-site.xml, core-site.xml, webhcat-env.xml, etc). These files contain 
information of the existing properties only. Custom Properties added by ambari 
user have no provision to store their additional attributes. 

Since, for this Jira we are concerned with only <property-type> attribute for 
Custom Properties, we could add an additional field called "Property Type" in 
the "Add Property" pop-up which shows up on clicking "Add Property ..." in the 
Custom property section for a service. For now, only 2 options are shown in the 
drop-down list: NONE and PASSWORD .
A few sample test properties are created using the new "Add Property" pop-up as 
can be seen in the following attachments. 

The <property-type> information for these Custom properties is stored in the DB 
in "clusterconfig" table, "config_attributes" column.
The schema for "clusterconfig" table can be seen in the attachment:

The content of the "config_attributes" column with the <property-type> 
information from the new Custom properties can be seen in the attachment:

Note: The fix so far is performed only for new Custom properties. The 
<property-type> information for existing properties is extracted from the 
corresponding property xml files for the service.

Diffs (updated)

  ambari-web/app/messages.js 24c9cfa 
  ambari-web/app/mixins/common/configs/configs_saver.js 43a77ce 
  ambari-web/app/models/configs/objects/service_config_property.js 844806f 
  ambari-web/app/templates/common/configs/addPropertyWindow.hbs 659435c 
  ambari-web/app/utils/config.js 9bb977a 
  ambari-web/test/mixins/common/configs/configs_saver_test.js 4baf303 

Diff: https://reviews.apache.org/r/49387/diff/

Testing (updated)

No new test cases are written in the patch apart from the fix required in 
"configs_saver_test.js" to avoid test failure of existing tests.
If the proposed solution is acceptable, I will create a new patch with the 
necessary new tests.

The existing ambari-web tests after applying the patch:

  28977 tests complete (37 seconds)
  154 tests pending
With the new latest patch "AMBARI-17041-trunk-July08.patch" the following is 
result of ambari-web tests:

  29017 tests complete (48 seconds)
  154 tests pending
With the new patch "AMBARI-17041-trunk-July13.patch" the following is the 
result of ambari-web tests:

  29021 tests complete (26 seconds)
  154 tests pending
**With the new patch "AMBARI-17041-trunk-July20.patch" the following is the 
result of ambari-web tests:
  29292 tests complete (42 seconds)
  154 tests pending


Keta Patel

Reply via email to