[Pacemaker] Pacemaker with corosync/openais 1.0.0

Andrew Beekhof andrew at beekhof.net
Wed Jul 15 09:36:51 UTC 2009


Try the following patch:

diff -r 17b83f4c66e3 lib/common/ais.c
--- a/lib/common/ais.c	Tue Jul 14 14:03:59 2009 +0200
+++ b/lib/common/ais.c	Wed Jul 15 11:34:01 2009 +0200
@@ -582,24 +582,23 @@ gboolean init_ais_connection(
 #else
 #  ifdef AIS_WHITETANK
     rc = openais_service_connect(CRM_SERVICE, &ais_ipc_ctx);
+    if(ais_ipc_ctx) {
+	ais_fd_async = openais_fd_get(ais_ipc_ctx);
+    }
 #  else
     rc = coroipcc_service_connect(
 	COROSYNC_SOCKET_NAME, CRM_SERVICE,
 	AIS_IPC_MESSAGE_SIZE, AIS_IPC_MESSAGE_SIZE, AIS_IPC_MESSAGE_SIZE,
 	&ais_ipc_handle);
+    if(ais_ipc_handle) {
+	coroipcc_fd_get(ais_ipc_handle, &ais_fd_async);
+    }
 #  endif
-    if(ais_ipc_ctx) {
-#  ifdef AIS_WHITETANK
-	ais_fd_async = openais_fd_get(ais_ipc_ctx);
-#  else
-	coroipcc_fd_get(ais_ipc_handle, &ais_fd_async);
-#  endif
-
-    } else if(rc == CS_OK) {
+#endif
+    if(ais_fd_async <= 0 && rc == CS_OK) {
 	crm_err("No context created, but connection reported 'ok'");
 	rc = CS_ERR_LIBRARY;
     }
-#endif
     if (rc != CS_OK) {
 	crm_info("Connection to our AIS plugin (%d) failed: %s (%d)",
CRM_SERVICE, ais_error2text(rc), rc);
     }




More information about the Pacemaker mailing list