You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2015/01/06 22:51:42 UTC
ambari git commit: AMBARI-8929. Agent is spamming logs with
tracebacks of "Error while executing command \'security_status\'" (rlevas)
Repository: ambari
Updated Branches:
refs/heads/trunk 4000258cb -> 40ffee9c8
AMBARI-8929. Agent is spamming logs with tracebacks of "Error while executing command \'security_status\'" (rlevas)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40ffee9c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40ffee9c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40ffee9c
Branch: refs/heads/trunk
Commit: 40ffee9c87160a085284d47dcf20d0a9643004a9
Parents: 4000258
Author: Robert Levas <rl...@hortonworks.com>
Authored: Tue Jan 6 16:51:27 2015 -0500
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Tue Jan 6 16:51:27 2015 -0500
----------------------------------------------------------------------
.../resource_management/libraries/script/script.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/40ffee9c/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 331af15..3185821 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -319,6 +319,22 @@ class Script(object):
"""
self.fail_with_error('configure method isn\'t implemented')
+ def security_status(self, env):
+ """
+ To be overridden by subclasses to provide the current security state of the component.
+ Implementations are required to set the "securityState" property of the structured out data set
+ to one of the following values:
+
+ UNSECURED - If the component is not configured for any security protocol such as
+ Kerberos
+ SECURED_KERBEROS - If the component is configured for Kerberos
+ UNKNOWN - If the security state cannot be determined
+ ERROR - If the component is supposed to be secured, but there are issues with the
+ configuration. For example, if the component is configured for Kerberos
+ but the configured principal and keytab file fail to kinit
+ """
+ self.put_structured_out({"securityState": "UNKNOWN"})
+
def generate_configs_get_template_file_content(self, filename, dicts):
config = self.get_config()
content = ''