mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
bug fix clustermanager
This commit is contained in:
@@ -25,7 +25,7 @@ class SSHServer(multi.Thread):
|
|||||||
def findSSHPort():
|
def findSSHPort():
|
||||||
try:
|
try:
|
||||||
|
|
||||||
sshData = ProcessUtilities.outputExecutioner('cat /etc/ssh/sshd_config').readlines()
|
sshData = ProcessUtilities.outputExecutioner('cat /etc/ssh/sshd_config').split('\n')
|
||||||
|
|
||||||
for items in sshData:
|
for items in sshData:
|
||||||
if items.find('Port') > -1:
|
if items.find('Port') > -1:
|
||||||
|
|||||||
@@ -74,17 +74,21 @@ class ClusterManager:
|
|||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
if type == 'Child':
|
if type == 'Child':
|
||||||
|
|
||||||
writeToFile = open(ClusterPath, 'w')
|
writeToFile = open(ClusterPath, 'w')
|
||||||
writeToFile.write(config['ClusterConfigFailover'])
|
writeToFile.write(config['ClusterConfigFailover'])
|
||||||
|
writeToFile.close()
|
||||||
|
|
||||||
command = 'systemctl start mysql'
|
command = 'systemctl start mysql'
|
||||||
ProcessUtilities.normalExecutioner(command)
|
ProcessUtilities.normalExecutioner(command)
|
||||||
|
|
||||||
self.config['failoverServerMessage'] = 'Successfully attached to cluster. [200]'
|
self.config['failoverServerMessage'] = 'Successfully attached to cluster. [200]'
|
||||||
self.PostStatus()
|
self.PostStatus()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
writeToFile = open(ClusterPath, 'w')
|
writeToFile = open(ClusterPath, 'w')
|
||||||
writeToFile.write(config['ClusterConfigMaster'])
|
writeToFile.write(config['ClusterConfigMaster'])
|
||||||
|
writeToFile.close()
|
||||||
|
|
||||||
command = 'galera_new_cluster'
|
command = 'galera_new_cluster'
|
||||||
ProcessUtilities.normalExecutioner(command)
|
ProcessUtilities.normalExecutioner(command)
|
||||||
|
|||||||
Reference in New Issue
Block a user