Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-1145: Profiler mpack does not create kafka acl and hbase acls correctly in kerberized cluster #726

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -98,6 +98,10 @@ def create_hbase_tables(self):
Logger.info("Done creating HBase Tables")
self.set_hbase_configured()

def init_kafka_acls(self):
Logger.info('Creating Kafka ACls for profiler')
metron_service.init_kafka_acls(self.__params, [self.__profiler_topic], ['profiler'])

def set_hbase_acls(self):
Logger.info("Setting HBase ACLs")
if self.__params.security_enabled:
Expand Down
Expand Up @@ -27,6 +27,7 @@

from metron_security import storm_security_setup
import metron_service
import metron_security
from profiler_commands import ProfilerCommands


Expand Down Expand Up @@ -59,6 +60,9 @@ def configure(self, env, upgrade_type=None, config_dir=None):
commands.create_hbase_tables()
if params.security_enabled and not commands.is_hbase_acl_configured():
commands.set_hbase_acls()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason that we do not call commands.set_hbase_acl_configured() here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to bring this up on an old, closed PR, but I am currently trying to track a bug that is giving me an uber headache. :) Thought this was the easiest way to reach out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickwallen It happens at the end of set_hbase_acls()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, daft, you're right. It works different than the Kafka ACL functions.

if params.security_enabled and not commands.is_acl_configured():
commands.init_kafka_acls()
commands.set_acl_configured()

Logger.info("Calling security setup")
storm_security_setup(params)
Expand All @@ -68,6 +72,18 @@ def start(self, env, upgrade_type=None):
env.set_params(params)
self.configure(env)
commands = ProfilerCommands(params)
if params.security_enabled:
metron_security.kinit(params.kinit_path_local,
params.metron_keytab_path,
params.metron_principal_name,
execute_user=params.metron_user)

if params.security_enabled and not commands.is_hbase_acl_configured():
commands.set_hbase_acls()
if params.security_enabled and not commands.is_acl_configured():
commands.init_kafka_acls()
commands.set_acl_configured()

commands.start_profiler_topology(env)

def stop(self, env, upgrade_type=None):
Expand Down