Repository: metron Updated Branches: refs/heads/master 358e40bd1 -> 17d1ac348
METRON-1296 Full Dev Fails to Deploy Index Templates (nickwallen via cestella) closes apache/incubator-metron#829 Project: http://git-wip-us.apache.org/repos/asf/metron/repo Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/17d1ac34 Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/17d1ac34 Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/17d1ac34 Branch: refs/heads/master Commit: 17d1ac348138fe029e4a341c54201fc6b4b50448 Parents: 358e40b Author: nickwallen <[email protected]> Authored: Tue Nov 7 09:56:08 2017 -0500 Committer: cstella <[email protected]> Committed: Tue Nov 7 09:56:08 2017 -0500 ---------------------------------------------------------------------- .../METRON/CURRENT/package/scripts/indexing_master.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/metron/blob/17d1ac34/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py ---------------------------------------------------------------------- diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py index e88b949..ed3e4ff 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py @@ -80,14 +80,19 @@ class Indexing(Script): from params import params env.set_params(params) self.configure(env) + commands = IndexingCommands(params) + # Install elasticsearch templates try: if not commands.is_elasticsearch_template_installed(): self.elasticsearch_template_install(env) commands.set_elasticsearch_template_installed() - except: - Logger.warning("WARNING: Elasticsearch templates could not be installed. The Elasticsearch service is probably down.") - commands = IndexingCommands(params) + + except Exception as e: + msg = "WARNING: Elasticsearch index templates could not be installed. " \ + "Is Elasticsearch running? Will reattempt install on next start. error={0}" + Logger.warning(msg.format(e)) + commands.start_indexing_topology(env) def stop(self, env, upgrade_type=None):
