diff --git a/script/impl/dorado_disaster_recovery/ddr_base.py b/script/impl/dorado_disaster_recovery/ddr_base.py index affa3c569fe5ca068806c42cf25a1c25e3e8a82f..c52b8e7f7c863ea4713662b2b1b108d56932634d 100644 --- a/script/impl/dorado_disaster_recovery/ddr_base.py +++ b/script/impl/dorado_disaster_recovery/ddr_base.py @@ -553,8 +553,9 @@ class DoradoDisasterRecoveryBase(StreamingBase): self.logger.debug("Build Main standby step is not for mode:%s." % self.params.mode) return cmd = "gs_ddr -t start -m primary [-X /path/of/xml | --json /path/of/json] --disaster_type [dorado|stream]" - self.logger.log("Start build main standby datanode in disaster standby cluster.\n" - "And now, on the primary cluster exectue the command: \n %s" % cmd) + self.logger.log("Now, make sure that the command has been executed on the primary cluste: \n %s" + "Start build main standby datanode in disaster standby cluster.\n" + "Waiting build main standby success." % cmd) primary_dn = [dn_inst for db_node in self.cluster_info.dbNodes for dn_inst in db_node.datanodes if dn_inst.instanceId in self.primary_dn_ids] main_standby_inst = primary_dn[0] diff --git a/script/impl/dorado_disaster_recovery/ddr_constants.py b/script/impl/dorado_disaster_recovery/ddr_constants.py index df7cbba52ff52de04577e688d97c9d173dcf8a75..f37f0b9bb5ec554440a81fad0640123869b45466 100644 --- a/script/impl/dorado_disaster_recovery/ddr_constants.py +++ b/script/impl/dorado_disaster_recovery/ddr_constants.py @@ -71,7 +71,13 @@ class DoradoDisasterRecoveryConstants: # log remark LOG_REMARK = "-" * 80 - START_MSG = "Please ensure that the \"Remote Replication Pairs\" configured correctly "\ + START_PRIMARY_MSG = "Please ensure that disaster_standby finish build and "\ + "the \"Remote Replication Pairs\" configured correctly "\ + "between the primary cluster and the disaster recovery cluster, "\ + "with Replication Mode in \"Synchronous\" state.\n" \ + "Ready to move on (yes/no)? " + + START_STANDBY_MSG = "Please ensure that the \"Remote Replication Pairs\" configured correctly "\ "between the primary cluster and the disaster recovery cluster, "\ "with Replication Mode in \"Synchronous\" state.\n" \ "Ready to move on (yes/no)? " diff --git a/script/impl/dorado_disaster_recovery/ddr_modules/dorado_disaster_recovery_start.py b/script/impl/dorado_disaster_recovery/ddr_modules/dorado_disaster_recovery_start.py index ce76d8aa67863d03ee15a49c6f5b73e7fd34f905..9b228b7dfcef9c5b2d2871b389fbee382df2cdcf 100644 --- a/script/impl/dorado_disaster_recovery/ddr_modules/dorado_disaster_recovery_start.py +++ b/script/impl/dorado_disaster_recovery/ddr_modules/dorado_disaster_recovery_start.py @@ -148,8 +148,14 @@ class DisasterRecoveryStartHandler(DoradoDisasterRecoveryBase): if step >= 8: return self.logger.debug("Start eighth step of ddr start.") + start_cmd = "gs_ddr -t start -m disaster_standby [-X /path/of/xml | --json /path/of/json] --disaster_type [dorado|stream]" + if self.params.mode == "primary": + self.logger.log("Now, make sure that the command has been executed on the standby cluster: \n %s" % start_cmd) if self.params.disaster_type == "dorado": - self.check_input(DoradoDisasterRecoveryConstants.START_MSG) + if self.params.mode == "disaster_standby": + self.check_input(DoradoDisasterRecoveryConstants.START_STANDBY_MSG) + else: + self.check_input(DoradoDisasterRecoveryConstants.START_PRIMARY_MSG) self.start_cluster(cm_timeout=DoradoDisasterRecoveryConstants.STANDBY_START_TIMEOUT, only_mode='disaster_standby') self.update_dorado_info("cluster", "full_backup", only_mode='primary') diff --git a/script/impl/streaming_disaster_recovery/streaming_base.py b/script/impl/streaming_disaster_recovery/streaming_base.py index 46f1b8d06784dadca5e32c389e2f10c7a625e26b..20e943ee58bade49036d50007da2fed57b36b954 100644 --- a/script/impl/streaming_disaster_recovery/streaming_base.py +++ b/script/impl/streaming_disaster_recovery/streaming_base.py @@ -1499,10 +1499,7 @@ class StreamingBase(object): if only_mode and self.params.mode != only_mode: self.logger.debug("Start cluster is not for mode:%s." % self.params.mode) return - start_cmd = "gs_ddr -t start -m disaster_standby [-X /path/of/xml | --json /path/of/json] --disaster_type [dorado|stream]" self.logger.log("Waiting for the main standby connection.") - if self.params.task == "start": - self.logger.log("And now, on the standby cluster exectue the command: \n %s" % start_cmd) end_time = datetime.now() + timedelta(seconds=self.params.waitingTimeout) while True: p_inst_list = [int(i) for i in DefaultValue.get_primary_dn_instance_id("Primary",