ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [03/12] ambari git commit: AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki)
Date Mon, 08 Feb 2016 14:03:23 GMT
AMBARI-14931: HAWQ service checks failing for single node clusters (nalex via jaoki)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: b95d52e986d90b4f2e98d3da566a1a3d4731107b
Parents: 60adfbc
Author: Jun Aoki <jaoki@apache.org>
Authored: Fri Feb 5 16:14:46 2016 -0800
Committer: Jun Aoki <jaoki@apache.org>
Committed: Fri Feb 5 16:14:46 2016 -0800

----------------------------------------------------------------------
 .../common-services/HAWQ/2.0.0/package/scripts/utils.py        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b95d52e9/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py
index e607a28..51a38d1 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py
@@ -82,7 +82,7 @@ def exec_ssh_cmd(hostname, cmd):
   import params
   # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter
   if params.hostname != hostname:
-    cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
{1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd)
+    cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1}
\"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd)
   else:
     cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd)
   Logger.info("Command executed: {0}".format(cmd))
@@ -97,9 +97,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True):
   """
   src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file)
   if tuples_only:
-    cmd = src_cmd + " && psql -d {0} -c \\\\\\\"{1};\\\\\\\"".format(db, command)
+    cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command)
   else:
-    cmd = src_cmd + " && psql -t -d {0} -c \\\\\\\"{1};\\\\\\\"".format(db, command)
+    cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command)
   retcode, out, err = exec_ssh_cmd(host, cmd)
   if retcode:
     Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr:
{3}".format(cmd, retcode, out, err))


Mime
View raw message