anandsubbu commented on a change in pull request #1308: METRON-1945: Metron
MPack support for Knox SSO setup
URL: https://github.com/apache/metron/pull/1308#discussion_r243188436
##########
File path:
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py
##########
@@ -588,3 +589,35 @@ def check_indexer_parameters():
if len(missing) > 0:
raise Fail("Missing required indexing parameters(s): indexer={0},
missing={1}".format(indexer, missing))
+
+def install_metron_knox(params):
+ if os.path.exists(params.knox_home):
+ template = """export KNOX_HOME={0}; \
+ export KNOX_USER={1}; \
+ export KNOX_GROUP={2}; \
+ {3}/bin/install_metron_knox.sh; \
+ unset KNOX_USER; \
+ unset KNOX_GROUP; \
+ unset KNOX_HOME;"""
+ cmd = template.format(params.knox_home, params.knox_user,
params.knox_group, params.metron_home)
+
+ Execute(cmd)
+
+def is_metron_knox_installed(params):
+ return os.path.isfile(params.metron_knox_installed_flag_file)
+
+def set_metron_knox_installed(params):
Review comment:
This step fails on a multi node install since $METRON_HOME will not be
present on a non-Metron node. We need to add a step to create the directory
`$METRON_HOME/config/zookeeper` before updating the `metron_knox_installed`
flag file.
Attached is the from Ambari when restarting Metron Client on a non-Metron
node.
[restart-metron-client.log](https://github.com/apache/metron/files/2697992/restart-metron-client.log)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services