This is an automated email from the ASF dual-hosted git repository.

jialiang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e1217f0d59 fix bootstrap.py RunCommand from python to python3 (#3808)
e1217f0d59 is described below

commit e1217f0d5915d95c1f9d047d70eea40ea902a4c9
Author: xjmu <[email protected]>
AuthorDate: Mon Aug 12 08:59:46 2024 +0800

    fix bootstrap.py RunCommand from python to python3 (#3808)
---
 ambari-server/src/main/python/bootstrap.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ambari-server/src/main/python/bootstrap.py 
b/ambari-server/src/main/python/bootstrap.py
index 7b3e36bd78..13aed53801 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -345,7 +345,7 @@ class BootstrapWindows(Bootstrap):
     user_run_as = self.shared_state.user_run_as
     server = self.shared_state.ambari_server
     version = self.getAmbariVersion()
-    return ' '.join(['python', setupFile, expected_hostname, passphrase, 
server, user_run_as, version])
+    return ' '.join(['python3', setupFile, expected_hostname, passphrase, 
server, user_run_as, version])
 
   def runSetupAgent(self):
     self.host_log.write("==========================\n")
@@ -609,7 +609,7 @@ class BootstrapDefault(Bootstrap):
     version = self.getAmbariVersion()
     port = self.getAmbariPort()
     passwordFile = self.getPasswordFile()
-    return "{sudo} -S python ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " 
+ str(expected_hostname) + \
+    return "{sudo} -S python3 ".format(sudo=AMBARI_SUDO) + str(setupFile) + " 
" + str(expected_hostname) + \
            " " + str(passphrase) + " " + str(server)+ " " + 
quote_bash_args(str(user_run_as)) + " " + str(version) + \
            " " + str(port) + " < " + str(passwordFile)
 
@@ -620,7 +620,7 @@ class BootstrapDefault(Bootstrap):
     user_run_as = self.shared_state.user_run_as
     version=self.getAmbariVersion()
     port=self.getAmbariPort()
-    return "{sudo} python ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + 
str(expected_hostname) + \
+    return "{sudo} python3 ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + 
str(expected_hostname) + \
            " " + str(passphrase) + " " + str(server)+ " " + 
quote_bash_args(str(user_run_as)) + " " + str(version) + \
            " " + str(port)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to