----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39933/#review105734 -----------------------------------------------------------
ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py (line 123) <https://reviews.apache.org/r/39933/#comment164358> Should probably log that you're sleeping here. You could also use the parameters which are part of the Execute class: Execute(command, tries=5, try_sleep=15) ambari-server/src/main/resources/common-services/RANGER/0.4.0/alerts.json (line 36) <https://reviews.apache.org/r/39933/#comment164359> Grammar: This alert is used to ensure that the Ranger Admin password in Ambari is correct. ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/alerts/alert_ranger_admin_passwd_check.py (lines 65 - 82) <https://reviews.apache.org/r/39933/#comment164360> If any of these not found in the configuration then doesn't that mean that all of the above vars are going to be None and cause problems in the code? Instead, we should fail the alert and say that required config properties weren't present. ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/alerts/alert_ranger_admin_passwd_check.py (line 118) <https://reviews.apache.org/r/39933/#comment164361> I think that str(e) only takes the first line of the exception. That's fine if we don't want to capture the entire traceback. However if that's the case we should also do a Logger.exception() here to ensure that we capture the entire stack somewhere. Either that or just use traceback.extract_tb to assign the whole stack to the return variable. ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/alerts/alert_ranger_admin_passwd_check.py (lines 172 - 173) <https://reviews.apache.org/r/39933/#comment164363> Can you just catch HttpError here instead of casting? Also, maybe log the error or return it as part of the alert? - Jonathan Hurley On Nov. 9, 2015, 11:35 a.m., Gautam Borad wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39933/ > ----------------------------------------------------------- > > (Updated Nov. 9, 2015, 11:35 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, Jonathan > Hurley, Mahadev Konar, Nate Cole, Sumit Mohanty, Selvamohan Neethiraj, > Srimanth Gunturi, Velmurugan Periasamy, and Yusaku Sako. > > > Bugs: AMBARI-13706 > https://issues.apache.org/jira/browse/AMBARI-13706 > > > Repository: ambari > > > Description > ------- > > Patch contains alert definition for checking credentials of Ranger Users (in > Ambari): 'admin' and 'amb_ranger_admin' > > > Diffs > ----- > > > ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py > 4beeca9 > > ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py > 328cf7f > > ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml > 1b5c6cb > ambari-server/src/main/resources/common-services/RANGER/0.4.0/alerts.json > 62f29eb > > ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/alerts/alert_ranger_admin_passwd_check.py > PRE-CREATION > > ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/ranger-hbase-plugin-properties.xml > 036681c > > ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/ranger-hdfs-plugin-properties.xml > 185ea5d > > ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/ranger-hive-plugin-properties.xml > 4fc1423 > > ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/ranger-storm-plugin-properties.xml > 1fef03f > > ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/configuration/ranger-kafka-plugin-properties.xml > 8b96763 > ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/alerts.json > 2de5f87 > > ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/admin-properties.xml > 837b26e > > ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/ranger-yarn-plugin-properties.xml > 439db46 > > Diff: https://reviews.apache.org/r/39933/diff/ > > > Testing > ------- > > Checked for Alerts in following conditions > > 1) Correct credentials for admin, amb_ranger_admin > 2) Invalid credential of admin user > 3) Invalid credential of amb_ranger_admin user > > > Thanks, > > Gautam Borad > >
