om 适配支持大版本升级

This commit is contained in:
gyt0221
2020-12-29 15:09:02 +08:00
parent 0fbbc08162
commit 618596a7f2
12 changed files with 3061 additions and 228 deletions

View File

@ -67,10 +67,16 @@ class Kernel(BaseComponent):
"""
def start(self, time_out=DefaultValue.TIMEOUT_CLUSTER_START,
security_mode="off"):
security_mode="off", cluster_number=None):
"""
"""
cmd = "%s/gs_ctl start -D %s " % (self.binPath, self.instInfo.datadir)
if cluster_number:
cmd = "%s/gs_ctl start -o '-u %s' -D %s " % (
self.binPath, int(float(cluster_number) * 1000),
self.instInfo.datadir)
else:
cmd = "%s/gs_ctl start -D %s " % (
self.binPath, self.instInfo.datadir)
if self.instInfo.instanceType == DefaultValue.MASTER_INSTANCE:
if len(self.instInfo.peerInstanceInfos) > 0:
cmd += "-M primary"