+ bnc804707-reduce-RR-priority.patch - Fix the race between udev making misc device node and ocfs2 opening that device (bnc#805764) + bug-805764-ocfs2-controld.patch - ocfs2_controld: ocfs2_controld-pacemaker.diff -- changes to be compatible with pacemaker >= 1.1.8 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=55
61 lines
1.8 KiB
Diff
61 lines
1.8 KiB
Diff
Index: ocfs2-tools/ocfs2_controld/pacemaker.c
|
|
===================================================================
|
|
--- ocfs2-tools.orig/ocfs2_controld/pacemaker.c 2012-08-24 10:02:19.000000000 -0500
|
|
+++ ocfs2-tools/ocfs2_controld/pacemaker.c 2012-11-26 16:16:38.000000000 -0600
|
|
@@ -28,9 +28,8 @@
|
|
#define SUPPORT_HEARTBEAT 0
|
|
|
|
#include <pacemaker/crm/crm.h>
|
|
-#include <pacemaker/crm/ais.h>
|
|
-#include <pacemaker/crm/common/cluster.h>
|
|
-#include <pacemaker/crm/common/stack.h>
|
|
+#include <pacemaker/crm/cluster.h>
|
|
+#include <pacemaker/crm/cluster/plugin.h>
|
|
#include <pacemaker/crm/common/ipc.h>
|
|
#include <pacemaker/crm/msg_xml.h>
|
|
|
|
@@ -47,6 +46,7 @@ static char * clustername = "pacemaker"
|
|
extern struct list_head mounts;
|
|
const char *stackname = "pcmk";
|
|
|
|
+static crm_cluster_t crm_cluster;
|
|
extern int ais_fd_async;
|
|
char *local_node_uname = NULL;
|
|
|
|
@@ -138,28 +138,29 @@ static void dead_pcmk(int ci)
|
|
connection_dead(ci);
|
|
}
|
|
|
|
-extern void terminate_ais_connection(void);
|
|
-
|
|
void exit_stack(void)
|
|
{
|
|
log_debug("closing pacemaker connection");
|
|
- terminate_ais_connection();
|
|
+ crm_cluster_disconnect(&crm_cluster);
|
|
}
|
|
|
|
static void process_pcmk(int ci)
|
|
{
|
|
- ais_dispatch(ais_fd_async, NULL);
|
|
+ ais_dispatch(NULL);
|
|
}
|
|
|
|
int setup_stack(void)
|
|
{
|
|
- crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL);
|
|
+ crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL, FALSE);
|
|
|
|
- if(init_ais_connection(NULL, NULL, NULL, &local_node_uname, &our_nodeid) == FALSE) {
|
|
+ if(crm_cluster_connect(&crm_cluster) == FALSE) {
|
|
log_error("Connection to our AIS plugin (CRM) failed");
|
|
return -1;
|
|
}
|
|
|
|
+ local_node_uname = crm_cluster.uname;
|
|
+ our_nodeid = crm_cluster.nodeid;
|
|
+
|
|
/* Sign up for membership updates */
|
|
send_ais_text(crm_class_notify, "true", TRUE, NULL, crm_msg_ais);
|
|
|