未验证 提交 f580a301 编写于 作者: wafwerar's avatar wafwerar 提交者: GitHub

Merge pull request #13213 from taosdata/fix/ZhiqiangWang/TD-16105-config-remote-server-info

fix(os): config remote server info
...@@ -169,7 +169,12 @@ class TDDnode: ...@@ -169,7 +169,12 @@ class TDDnode:
self.cfgDict.update({option: value}) self.cfgDict.update({option: value})
def remoteExec(self, updateCfgDict, execCmd): def remoteExec(self, updateCfgDict, execCmd):
remote_conn = Connection(self.remoteIP, port=22, user='root', connect_kwargs={'password':'123456'}) try:
config = eval(self.remoteIP)
remote_conn = Connection(host=config["host"], port=config["port"], user=config["user"], connect_kwargs={'password':config["password"]})
remote_top_dir = config["path"]
except Exception as r:
remote_conn = Connection(host=self.remoteIP, port=22, user='root', connect_kwargs={'password':'123456'})
remote_top_dir = '~/test' remote_top_dir = '~/test'
valgrindStr = '' valgrindStr = ''
if (self.valgrind==1): if (self.valgrind==1):
......
...@@ -145,6 +145,10 @@ if __name__ == "__main__": ...@@ -145,6 +145,10 @@ if __name__ == "__main__":
if masterIp == "": if masterIp == "":
host = '127.0.0.1' host = '127.0.0.1'
else: else:
try:
config = eval(masterIp)
host = config["host"]
except Exception as r:
host = masterIp host = masterIp
tdLog.info("Procedures for tdengine deployed in %s" % (host)) tdLog.info("Procedures for tdengine deployed in %s" % (host))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册