commit
63d0d0833e
@ -86,6 +86,10 @@ def test_sync_standby_name():
|
||||
assert expect_output == check_sync_standby_str(dnlist, output)
|
||||
|
||||
# ANY grouping
|
||||
output = "ANY 1 (dn_6002), ANY 1 (dn_6003)"
|
||||
expect_output = "ANY 1 (dn_6002)"
|
||||
assert expect_output.replace(" ", "") == check_sync_standby_str(dnlist, output).replace(" ", "")
|
||||
|
||||
output = "ANY 1 (dn_6002, dn_6003)"
|
||||
expect_output = "ANY 1 (dn_6002)"
|
||||
assert expect_output.replace(" ", "") == check_sync_standby_str(dnlist, output).replace(" ", "")
|
||||
|
@ -347,6 +347,8 @@ class PreinstallImplOLAP(PreinstallImpl):
|
||||
"""
|
||||
if "HOST_IP" in os.environ.keys():
|
||||
return
|
||||
if not self.context.current_user_root:
|
||||
return
|
||||
self.context.logger.log("Setting pssh path", "addStep")
|
||||
try:
|
||||
pssh_path = os.path.join(os.path.dirname(__file__),
|
||||
@ -356,8 +358,7 @@ class PreinstallImplOLAP(PreinstallImpl):
|
||||
psshlib_path = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"../../../gspylib/pssh/bin/TaskPool.py")
|
||||
# 将pssh放到om tools的bin目录下
|
||||
dest_path = os.path.join(self.context.clusterToolPath, "script")
|
||||
dest_path = "/usr/bin/"
|
||||
secbox_path = "/var/chroot/usr/bin/"
|
||||
cmd = "cp %s %s %s %s" % (
|
||||
pssh_path, pscp_path, psshlib_path, dest_path)
|
||||
|
@ -655,7 +655,9 @@ Common options:
|
||||
if not self.mpprcFile:
|
||||
self.mpprcFile = ProfileFile.get_user_bashrc(self.user)
|
||||
retry = 1
|
||||
cmd = "source %s;pssh -s -H %s hostname" % (self.mpprcFile, node_name)
|
||||
node = self.clusterInfo.getDbNodeByName(node_name)
|
||||
node_ip = node.sshIps[0]
|
||||
cmd = "source %s;pssh -s -H %s hostname" % (self.mpprcFile, node_ip)
|
||||
while True:
|
||||
(status, output) = subprocess.getstatusoutput(cmd)
|
||||
self.logger.debug("Checking hostname mapping for node [%s]. output: %s" % (node_name, output))
|
||||
@ -668,7 +670,7 @@ Common options:
|
||||
retry += 1
|
||||
time.sleep(1)
|
||||
|
||||
hostname_cmd = "source %s;pssh -s -H %s 'cat /etc/hostname'" % (self.mpprcFile, node_name)
|
||||
hostname_cmd = "source %s;pssh -s -H %s 'cat /etc/hostname'" % (self.mpprcFile, node_ip)
|
||||
(status, output) = subprocess.getstatusoutput(hostname_cmd)
|
||||
if status == 0 and output.strip() == node_name:
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user