----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29370/#review65940 -----------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py <https://reviews.apache.org/r/29370/#comment109213> `__update_definition_configs(...)` is only ever invoked with `reschedule_jobs=True` - it doesn't need this parameter. ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py <https://reviews.apache.org/r/29370/#comment109214> Log this instead (or in addition to) the traceback via logger.exception(message) ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py <https://reviews.apache.org/r/29370/#comment109212> `not_valid_only` seems to bypass the real logic of this method. The idea here was to only reschedule alerts that are no longer valid. Instead, I'd just create a new method called `reschedule_all` that just iterates through all jobs and removes them by their ID; no need to make this method have odd execution paths. Also, there should be some locking / concurrency checks put in either `rescehdule()/reschedule_all()` or `_collector.remove_by_uuid` to ensure we don't have threading issues. ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py <https://reviews.apache.org/r/29370/#comment109215> Seems like a very expensive check; have you tested the performance of this set difference? Configs can be rather large. - Jonathan Hurley On Dec. 23, 2014, 8:50 a.m., Andrew Onischuk wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29370/ > ----------------------------------------------------------- > > (Updated Dec. 23, 2014, 8:50 a.m.) > > > Review request for Ambari and Jonathan Hurley. > > > Bugs: AMBARI-8885 > https://issues.apache.org/jira/browse/AMBARI-8885 > > > Repository: ambari > > > Description > ------- > > Looks like currently alerts use some sort of cached values. After enabling > security security_enabled value is false in alerts. After restarting agent it > changes to true. > Agent should not require restart after enabling security for alerts to work. > > > Diffs > ----- > > ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py 19c1ee0 > ambari-agent/src/test/python/ambari_agent/TestAlerts.py 61473ec > > Diff: https://reviews.apache.org/r/29370/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Andrew Onischuk > >
