| 1766 | } |
| 1767 | |
| 1768 | int report_node_state(enum clusterer_event event, int cluster_id, int node_id) |
| 1769 | { |
| 1770 | if (raise_node_state_ev(event, cluster_id, node_id) < 0) { |
| 1771 | LM_ERR("Failed to raise node state changed event for: " |
| 1772 | "cluster_id=%d node_id=%d\n", cluster_id, node_id); |
| 1773 | return -1; |
| 1774 | } |
| 1775 | |
| 1776 | if (sr_add_report_fmt(cl_srg, STR2CI(node_st_sr_ident), 0, |
| 1777 | "Node [%d], cluster [%d] is %s", node_id, cluster_id, |
| 1778 | event==CLUSTER_NODE_DOWN ? "DOWN" : "UP") < 0) { |
| 1779 | LM_ERR("Failed to add SR report for node state change, " |
| 1780 | "cluster_id=%d, node_id=%d\n", cluster_id, node_id); |
| 1781 | return -1; |
| 1782 | } |
| 1783 | |
| 1784 | return 0; |
| 1785 | } |
| 1786 | |
| 1787 | void do_actions_node_ev(cluster_info_t *clusters, int *select_cluster, |
| 1788 | int no_clusters) |
no test coverage detected