|
|
6f8c14 |
From 04d32266b378f5f47088e8f34703bdd9c95f5a4c Mon Sep 17 00:00:00 2001
|
|
|
6f8c14 |
From: "Gao,Yan" <ygao@suse.com>
|
|
|
6f8c14 |
Date: Thu, 30 Nov 2017 16:11:00 +0100
|
|
|
6f8c14 |
Subject: [PATCH] Build: cluster-servant: Compile with pacemaker-2.0
|
|
|
6f8c14 |
|
|
|
6f8c14 |
Pacemaker-2.0 removed support for corosync 1 cluster layer:
|
|
|
6f8c14 |
https://github.com/ClusterLabs/pacemaker/commit/7a9891f29
|
|
|
6f8c14 |
---
|
|
|
6f8c14 |
configure.ac | 4 ++++
|
|
|
6f8c14 |
src/sbd-cluster.c | 4 ++++
|
|
|
6f8c14 |
2 files changed, 8 insertions(+)
|
|
|
6f8c14 |
|
|
|
6f8c14 |
diff --git a/configure.ac b/configure.ac
|
|
|
6f8c14 |
index 1eb8758..1f328c2 100644
|
|
|
6f8c14 |
--- a/configure.ac
|
|
|
6f8c14 |
+++ b/configure.ac
|
|
|
6f8c14 |
@@ -72,6 +72,10 @@ AC_CHECK_HEADERS(pacemaker/crm/cluster.h)
|
|
|
6f8c14 |
AC_CHECK_LIB(crmcommon, pcmk_strerror, , missing="yes")
|
|
|
6f8c14 |
AC_CHECK_LIB(cib, cib_apply_patch_event, , missing="yes")
|
|
|
6f8c14 |
|
|
|
6f8c14 |
+dnl pacemaker-2.0 removed support for corosync 1 cluster layer
|
|
|
6f8c14 |
+AC_CHECK_DECLS([pcmk_cluster_classic_ais, pcmk_cluster_cman],,,
|
|
|
6f8c14 |
+ [#include <pacemaker/crm/cluster.h>])
|
|
|
6f8c14 |
+
|
|
|
6f8c14 |
if test "$missing" = "yes"; then
|
|
|
6f8c14 |
AC_MSG_ERROR([Missing required libraries or functions.])
|
|
|
6f8c14 |
fi
|
|
|
6f8c14 |
diff --git a/src/sbd-cluster.c b/src/sbd-cluster.c
|
|
|
6f8c14 |
index de99d0c..ae4750e 100644
|
|
|
6f8c14 |
--- a/src/sbd-cluster.c
|
|
|
6f8c14 |
+++ b/src/sbd-cluster.c
|
|
|
6f8c14 |
@@ -238,12 +238,16 @@ notify_timer_cb(gpointer data)
|
|
|
6f8c14 |
}
|
|
|
6f8c14 |
|
|
|
6f8c14 |
switch (get_cluster_type()) {
|
|
|
6f8c14 |
+#if HAVE_DECL_PCMK_CLUSTER_CLASSIC_AIS
|
|
|
6f8c14 |
case pcmk_cluster_classic_ais:
|
|
|
6f8c14 |
send_cluster_text(crm_class_quorum, NULL, TRUE, NULL, crm_msg_ais);
|
|
|
6f8c14 |
break;
|
|
|
6f8c14 |
|
|
|
6f8c14 |
+#endif
|
|
|
6f8c14 |
case pcmk_cluster_corosync:
|
|
|
6f8c14 |
+#if HAVE_DECL_PCMK_CLUSTER_CMAN
|
|
|
6f8c14 |
case pcmk_cluster_cman:
|
|
|
6f8c14 |
+#endif
|
|
|
6f8c14 |
/* TODO - Make a CPG call and only call notify_parent() when we get a reply */
|
|
|
6f8c14 |
notify_parent();
|
|
|
6f8c14 |
break;
|
|
|
6f8c14 |
--
|
|
|
6f8c14 |
1.8.3.1
|
|
|
6f8c14 |
|