----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35834/ -----------------------------------------------------------
Review request for Ambari, Andrew Onischuk, Jonathan Hurley, and Nate Cole. Bugs: AMBARI-12128 https://issues.apache.org/jira/browse/AMBARI-12128 Repository: ambari Description ------- Falcon Server Web UI alert fails when Kerberos is enabled. The error message is ``` agent/data/tmp/web_alert_cc_2144dc375b8556f5a0c2629adedd2a99 -kt {{falcon-startup.properties/*.falcon.http.authentication.kerberos.keytab}} {{falcon-startup.properties/*.falcon.http.authentication.kerberos.principal}} > /dev/null' returned 1. kinit: Client not found in Kerberos database while getting initial credentials) ``` #Cause This issue was introduced when the patch for AMBARI-11656 was applied. The issue is related to this line (`ambari_agent/alerts/base_alert.py:217`) ``` replacement_match_regex = r"{{(%s)}}" % placeholder_key ``` When the relative falcon properties are applied, the generated regular expression becomes ``` {{(falcon-startup.properties/*.falcon.http.authentication.kerberos.keytab)}} ``` Which wants to match on values like: - falcon-startup.properties.falcon.http.authentication.kerberos.keytab - falcon-startup.properties/.falcon.http.authentication.kerberos.keytab - falcon-startup.properties/////////////Rfalcon.http.authentication.kerberos.keytab Not the one we really want - falcon-startup.properties/*.falcon.http.authentication.kerberos.keytab Either the {{*}} needs to be escaped or the use of regular expressions needs to be changed. #Solution Remove the regular expression replacement and use somple string replacement instead. Diffs ----- ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py 47e15f0 ambari-agent/src/test/python/ambari_agent/TestAlerts.py 151c13b Diff: https://reviews.apache.org/r/35834/diff/ Testing ------- Manually tested to see alert tests passed as expected. #Jenkins test results: PENDING Thanks, Robert Levas