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 -#include -#include -#include +#include +#include #include #include @@ -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);