def _push_corosync_conf_live( self, target_list, corosync_conf_data, need_stopped_cluster, need_qdevice_reload, skip_offline_nodes ): if need_stopped_cluster: com_cmd = CheckCorosyncOffline( self.report_processor, skip_offline_nodes ) com_cmd.set_targets(target_list) run_and_raise(self.get_node_communicator(), com_cmd) com_cmd = DistributeCorosyncConf( self.report_processor, corosync_conf_data, skip_offline_nodes ) com_cmd.set_targets(target_list) run_and_raise(self.get_node_communicator(), com_cmd) if is_service_running(self.cmd_runner(), "corosync"): reload_corosync_config(self.cmd_runner()) self.report_processor.process( reports.corosync_config_reloaded() ) if need_qdevice_reload: self.report_processor.process( reports.qdevice_client_reload_started() ) com_cmd = qdevice.Stop(self.report_processor, skip_offline_nodes) com_cmd.set_targets(target_list) run(self.get_node_communicator(), com_cmd) report_list = com_cmd.error_list com_cmd = qdevice.Start(self.report_processor, skip_offline_nodes) com_cmd.set_targets(target_list) run(self.get_node_communicator(), com_cmd) report_list += com_cmd.error_list if report_list: raise LibraryError()
def push_corosync_conf( self, corosync_conf_facade, skip_offline_nodes=False ): corosync_conf_data = corosync_conf_facade.config.export() if self.is_corosync_conf_live: node_list = corosync_conf_facade.get_nodes() if corosync_conf_facade.need_stopped_cluster: check_corosync_offline_on_nodes( self.node_communicator(), self.report_processor, node_list, skip_offline_nodes ) distribute_corosync_conf( self.node_communicator(), self.report_processor, node_list, corosync_conf_data, skip_offline_nodes ) if is_service_running(self.cmd_runner(), "corosync"): reload_corosync_config(self.cmd_runner()) self.report_processor.process( reports.corosync_config_reloaded() ) if corosync_conf_facade.need_qdevice_reload: qdevice_reload_on_nodes( self.node_communicator(), self.report_processor, node_list, skip_offline_nodes ) else: self._corosync_conf_data = corosync_conf_data
def push_corosync_conf( self, corosync_conf_facade, skip_offline_nodes=False ): corosync_conf_data = corosync_conf_facade.config.export() if self.is_corosync_conf_live: node_list = corosync_conf_facade.get_nodes() if corosync_conf_facade.need_stopped_cluster: check_corosync_offline_on_nodes( self.node_communicator(), self.report_processor, node_list, skip_offline_nodes ) distribute_corosync_conf( self.node_communicator(), self.report_processor, node_list, corosync_conf_data, skip_offline_nodes ) if is_service_running(self.cmd_runner(), "corosync"): reload_corosync_config(self.cmd_runner()) self.report_processor.process( reports.corosync_config_reloaded() ) if corosync_conf_facade.need_qdevice_reload: qdevice_reload_on_nodes( self.node_communicator(), self.report_processor, node_list, skip_offline_nodes ) else: self._corosync_conf_data = corosync_conf_data