On Sept. 8, 2016, 6:13 p.m., Qin Liu wrote: > > We don't have unit test whcih setup secure cluster so we should definitely > > test this on trunk build, which should be working now. > > The changes overall look good just want to make sure we have done some > > manual testing before commit. > > Qin Liu wrote: > Hi Sid, > I tried to test it on HDP2.5.0.0/trunk. but I was not able to bring the > metrics up. Do you have this experience? > But I will try to test it on HDP2.4/trunk.
I got latest version of trunk yesterday and setup to run AMS distributed mode without kerberos enabled but I was unable to start monitor and collector. I got: 1) Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 152, in <module> AmsCollector().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 281, in execute method(env) File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 734, in restart self.status(env) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 61, in status check_service_status(name='collector') File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk return fn(*args, **kwargs) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py", line 36, in check_service_status env.set_params(status_params) NameError: global name 'env' is not defined ====>introduced by AMBARI-17159 then I switched back to previous version of status.py and was able to start monitors. Then, I got: 2) Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 152, in <module> AmsCollector().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 284, in execute self.post_start() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 321, in post_start pid_files = self.get_pid_files() File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 73, in get_pid_files return status.get_collector_pid_files() AttributeError: 'module' object has no attribute 'get_collector_pid_files' then, I hardcoded to "return status.get_collector_pid_files()" with "return []" and was able to start collector with a warning. But monitor got " Error sending metrics to server. [Errno -2] Name or service not known" then " Metric collector host ['myhost.example.com'] was blacklisted." I didn't get a chance to look into it (it might be caused by status.get_collector_pid_files() "return []"). Any way, anyone saw above issues? Thank you! - Qin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51724/#review148224 ----------------------------------------------------------- On Sept. 8, 2016, 5:27 p.m., Qin Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51724/ > ----------------------------------------------------------- > > (Updated Sept. 8, 2016, 5:27 p.m.) > > > Review request for Ambari, Di Li, Dmytro Sen, and Sid Wagle. > > > Bugs: AMBARI-17898 > https://issues.apache.org/jira/browse/AMBARI-17898 > > > Repository: ambari > > > Description > ------- > > ()This is a subtask of AMBARI-14384 "Ambari Metrics doesn't use SPNEGO to > authenticate". > > In a Kerberos enabled cluster with SPNEGO enabled on Hadoop APIs, Ambari > Metrics Collector (in AMS distributed mode) web-console will be Kerberos HTTP > SPNEGO enabled too. But Ambari Metrics Monitor, a client of Ambari Metrics > Collector, currently does not support Kerberos HTTP SPNEGO authentication. > > /var/log/ambari-metrics-monitor/ambari-metrics-monitor.out: > 2015-12-15 13:26:30,663 [INFO] emitter.py:101 - server: > http://metrics-collector:6188/ws/v1/timeline/metrics > 2015-12-15 13:26:30,671 [WARNING] emitter.py:84 - Error sending metrics to > server. HTTP Error 401: Authentication required > 2015-12-15 13:26:30,671 [WARNING] emitter.py:90 - Retrying after 5 ... > > > Diffs > ----- > > ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_monitor.ini > 3e5d861 > > ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/config_reader.py > 02f0ce3 > > ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/emitter.py > 6997108 > > ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/faked_kerberos.py > PRE-CREATION > > ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/spnego_kerberos_auth.py > PRE-CREATION > > ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py > fc95aa7 > > ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2 > 383a0de > > Diff: https://reviews.apache.org/r/51724/diff/ > > > Testing > ------- > > 1. The fix has been tested with HDP-2.5.0.0/branch-2.4 UI (spnego enabled and > non-kerbero scenarios) > - the patch can be applied to branch-2.4 without any changes. > - I was not able to test it on trunk because the current trunk version of > metrics collector was not able to start > 2. The fix has passed existing unittest cases in both trunk and branch-2.4 > 3. I didn't add new unittest cases because I don't know how to create a > kerberos enabled the cluster in unittest cases. - please advise me on this, > thx! > > > Thanks, > > Qin Liu > >