You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2017/04/06 09:33:39 UTC

[18/41] ambari git commit: AMBARI-20648. Ambari Agent Distro/Conf Select Versions alert is not functioning correctly since missing format index when using Python 2.6 (alejandro)

AMBARI-20648. Ambari Agent Distro/Conf Select Versions alert is not functioning correctly since missing format index when using Python 2.6 (alejandro)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6e5c12f6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6e5c12f6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6e5c12f6

Branch: refs/heads/branch-3.0-perf
Commit: 6e5c12f670fb372d699af8b96ebd7cda77c20334
Parents: 038f637
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Fri Mar 31 14:39:30 2017 -0700
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Apr 6 12:32:56 2017 +0300

----------------------------------------------------------------------
 .../main/resources/host_scripts/alert_version_select.py   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6e5c12f6/ambari-server/src/main/resources/host_scripts/alert_version_select.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/host_scripts/alert_version_select.py b/ambari-server/src/main/resources/host_scripts/alert_version_select.py
index 118911f..0ce79e7 100644
--- a/ambari-server/src/main/resources/host_scripts/alert_version_select.py
+++ b/ambari-server/src/main/resources/host_scripts/alert_version_select.py
@@ -70,7 +70,7 @@ def execute(configurations={}, parameters={}, host_name=None):
     stack_tools_str = configurations[STACK_TOOLS]
 
     if stack_tools_str is None:
-      return (RESULT_STATE_UNKNOWN, ['{} is a required parameter for the script and the value is null'.format(STACK_TOOLS)])
+      return (RESULT_STATE_UNKNOWN, ['{0} is a required parameter for the script and the value is null'.format(STACK_TOOLS)])
 
     distro_select = "unknown-distro-select"
     try:
@@ -87,18 +87,18 @@ def execute(configurations={}, parameters={}, host_name=None):
       (code, out, versions) = unsafe_get_stack_versions()
 
       if code == 0:
-        msg.append("Ok. {}".format(distro_select))
+        msg.append("Ok. {0}".format(distro_select))
         if versions is not None and type(versions) is list and len(versions) > 0:
-          msg.append("Versions: {}".format(", ".join(versions)))
+          msg.append("Versions: {0}".format(", ".join(versions)))
         return (RESULT_STATE_OK, ["\n".join(msg)])
       else:
-        msg.append("Failed, check dir {} for unexpected contents.".format(stack_root_dir))
+        msg.append("Failed, check dir {0} for unexpected contents.".format(stack_root_dir))
         if out is not None:
           msg.append(out)
 
         return (RESULT_STATE_CRITICAL, ["\n".join(msg)])
     else:
-      msg.append("Ok. No stack root {} to check.".format(stack_root_dir))
+      msg.append("Ok. No stack root {0} to check.".format(stack_root_dir))
       return (RESULT_STATE_OK, ["\n".join(msg)])
   except Exception, e:
     return (RESULT_STATE_CRITICAL, [e.message])