def reboot_cluster()

in mysqloperator/controller/innodbcluster/cluster_controller.py [0:0]


    def reboot_cluster(self, seed_pod_index: MySQLPod, logger: Logger) -> None:
        pods = self.cluster.get_pods()
        seed_pod = pods[seed_pod_index]

        logger.info(f"Rebooting cluster {self.cluster.name} from pod {seed_pod}...")

        self.dba = shellutils.connect_dba(seed_pod.endpoint_co, logger)

        self.log_mysql_info(seed_pod, self.dba.session, logger)

        seed_pod.add_member_finalizer()

        self.dba_cluster = self.dba.reboot_cluster_from_complete_outage()

        logger.info(f"reboot_cluster_from_complete_outage OK.")

        # rejoin other pods
        for pod in pods:
            if pod.index != seed_pod_index:
                with shellutils.connect_to_pod(pod, logger, timeout=5) as session:
                    try:
                        self.rejoin_instance(pod, session, logger)
                    except:
                        # TODO - verify this will be retried from elsewhere
                        print("==================================================")
                        print(f"INSTANCE  REJOIN FAILED for {pod.name}")
                        print("=================================================")
                        import traceback
                        traceback.print_exc()

        # TODO: May not be in a ClusterSet (old Cluster?)
        cs = self.dba_cluster.get_cluster_set()
        cs_status = cs.status()
        # TODO: is there really a valid case where
        #       cs_status["clusters"][name] won't exist?
        if cs_status.get("clusters", {}).get(self.cluster.name, {}).get("globalStatus") == "INVALIDATED":
            try:
                cs.rejoin_cluster(self.cluster.name)
            except:
                print("========================")
                print("CLUSTERSET REJOIN FAILED")
                print("========================")

                import traceback
                traceback.print_exc()

        status = self.dba_cluster.status()
        logger.info(f"Cluster reboot successful. status={status}")

        self.probe_member_status(seed_pod, self.dba.session, True, logger)