Update to new upstream version - 1.1.5
This commit is contained in:
parent
28ddc20494
commit
15942e40af
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/Pacemaker-1.1.4.tar.bz2
|
||||
/Pacemaker-1.1.5.tar.bz2
|
||||
|
@ -1,40 +0,0 @@
|
||||
changeset: 9848:b7784ef1e32a
|
||||
parent: 9655:6e6980376f01
|
||||
user: Andrew Beekhof <andrew@beekhof.net>
|
||||
date: Mon May 17 17:48:59 2010 +0200
|
||||
files: crmd/callbacks.c lib/common/membership.c
|
||||
description:
|
||||
High: Core: Bug lf#2401 - Backed out changeset 6e6980376f01
|
||||
The original check was correct, as "member" in this context is only
|
||||
supposed to refer to comms-level membership.
|
||||
Additionally, the more agressive check borked the dlm and didn't
|
||||
actually resolve Bug lf#2401
|
||||
|
||||
|
||||
diff -r 6e6980376f01 -r b7784ef1e32a crmd/callbacks.c
|
||||
--- a/crmd/callbacks.c Tue Apr 20 10:20:15 2010 +0200
|
||||
+++ b/crmd/callbacks.c Mon May 17 17:48:59 2010 +0200
|
||||
@@ -394,7 +394,7 @@ crmd_client_status_callback(const char *
|
||||
return;
|
||||
}
|
||||
|
||||
- if(safe_str_eq(node, fsa_our_dc) && crm_is_member_active(member) == FALSE) {
|
||||
+ if(safe_str_eq(node, fsa_our_dc) && safe_str_eq(status, OFFLINESTATUS)){
|
||||
/* did our DC leave us */
|
||||
crm_info("Got client status callback - our DC is dead");
|
||||
register_fsa_input(C_CRMD_STATUS_CALLBACK, I_ELECTION, NULL);
|
||||
diff -r 6e6980376f01 -r b7784ef1e32a lib/common/membership.c
|
||||
--- a/lib/common/membership.c Tue Apr 20 10:20:15 2010 +0200
|
||||
+++ b/lib/common/membership.c Mon May 17 17:48:59 2010 +0200
|
||||
@@ -39,9 +39,7 @@ gboolean crm_have_quorum = FALSE;
|
||||
|
||||
gboolean crm_is_member_active(const crm_node_t *node)
|
||||
{
|
||||
- if(node
|
||||
- && safe_str_eq(node->state, CRM_NODE_MEMBER)
|
||||
- && (node->processes & crm_proc_crmd)) {
|
||||
+ if(node && safe_str_eq(node->state, CRM_NODE_MEMBER)) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
67
cman-disconnect.patch
Normal file
67
cman-disconnect.patch
Normal file
@ -0,0 +1,67 @@
|
||||
exporting patch:
|
||||
# HG changeset patch
|
||||
# User Andrew Beekhof <andrew@beekhof.net>
|
||||
# Date 1300351285 -3600
|
||||
# Node ID 2916bb5363e14eb130be3658faac77b58a61b600
|
||||
# Parent f3a9f8559c10b1c53b9c09f1d439194fe47f0fcb
|
||||
High: ais: Correctly disconnect from Corosync and Cman based clusters
|
||||
|
||||
diff -r f3a9f8559c10 -r 2916bb5363e1 crmd/control.c
|
||||
--- a/crmd/control.c Thu Mar 17 09:44:08 2011 +0100
|
||||
+++ b/crmd/control.c Thu Mar 17 09:41:25 2011 +0100
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <crm/pengine/rules.h>
|
||||
#include <crm/common/cluster.h>
|
||||
+#include "../lib/common/stack.h"
|
||||
|
||||
#include <crmd.h>
|
||||
#include <crmd_fsa.h>
|
||||
@@ -65,7 +66,9 @@ do_ha_control(long long action,
|
||||
if(action & A_HA_DISCONNECT) {
|
||||
if(is_openais_cluster()) {
|
||||
crm_peer_destroy();
|
||||
+ terminate_ais_connection();
|
||||
crm_info("Disconnected from OpenAIS");
|
||||
+
|
||||
#if SUPPORT_HEARTBEAT
|
||||
} else if(fsa_cluster_conn != NULL) {
|
||||
set_bit_inplace(fsa_input_register, R_HA_DISCONNECTED);
|
||||
diff -r f3a9f8559c10 -r 2916bb5363e1 lib/common/ais.c
|
||||
--- a/lib/common/ais.c Thu Mar 17 09:44:08 2011 +0100
|
||||
+++ b/lib/common/ais.c Thu Mar 17 09:41:25 2011 +0100
|
||||
@@ -408,23 +408,23 @@ void terminate_ais_connection(void)
|
||||
/* G_main_del_fd(ais_source); */
|
||||
/* G_main_del_fd(ais_source_sync); */
|
||||
|
||||
+ if(is_classic_ais_cluster() == FALSE) {
|
||||
+ coroipcc_service_disconnect(ais_ipc_handle);
|
||||
+
|
||||
+ } else {
|
||||
+ cpg_leave(pcmk_cpg_handle, &pcmk_cpg_group);
|
||||
+ }
|
||||
+
|
||||
+ if(is_corosync_cluster()) {
|
||||
+ quorum_finalize(pcmk_quorum_handle);
|
||||
+ }
|
||||
+
|
||||
#ifdef SUPPORT_CMAN
|
||||
if(is_cman_cluster()) {
|
||||
cman_stop_notification(pcmk_cman_handle);
|
||||
cman_finish(pcmk_cman_handle);
|
||||
}
|
||||
#endif
|
||||
-
|
||||
- if(is_corosync_cluster()) {
|
||||
- quorum_finalize(pcmk_quorum_handle);
|
||||
- }
|
||||
-
|
||||
- if(is_classic_ais_cluster() == FALSE) {
|
||||
- coroipcc_service_disconnect(ais_ipc_handle);
|
||||
-
|
||||
- } else {
|
||||
- cpg_leave(pcmk_cpg_handle, &pcmk_cpg_group);
|
||||
- }
|
||||
}
|
||||
|
||||
int ais_membership_timer = 0;
|
20
cman-dispatch-all.patch
Normal file
20
cman-dispatch-all.patch
Normal file
@ -0,0 +1,20 @@
|
||||
# HG changeset patch
|
||||
# User Simone Gotti <simone.gotti@gmail.com>
|
||||
# Date 1300021055 -3600
|
||||
# Node ID 8d31ac8a5aede2df525786802b24658d73748ba4
|
||||
# Parent d0472a26eda1394c22553d6d6e8f4e0321905192
|
||||
Dequeue all the cman emitted events and not only the first one leaving the others in the event's queue.
|
||||
This fixes a nasty bug that will led to a wrong quorum view in pacemaker.
|
||||
|
||||
diff -r d0472a26eda1 -r 8d31ac8a5aed lib/common/ais.c
|
||||
--- a/lib/common/ais.c Thu Mar 10 18:55:40 2011 +0100
|
||||
+++ b/lib/common/ais.c Sun Mar 13 13:57:35 2011 +0100
|
||||
@@ -626,7 +626,7 @@
|
||||
|
||||
static gboolean pcmk_cman_dispatch(int sender, gpointer user_data)
|
||||
{
|
||||
- int rc = cman_dispatch(pcmk_cman_handle, CMAN_DISPATCH_ONE);
|
||||
+ int rc = cman_dispatch(pcmk_cman_handle, CMAN_DISPATCH_ALL);
|
||||
if(rc < 0) {
|
||||
crm_err("Connection to cman failed: %d", rc);
|
||||
return FALSE;
|
31
cman-fencing-ack.patch
Normal file
31
cman-fencing-ack.patch
Normal file
@ -0,0 +1,31 @@
|
||||
# HG changeset patch
|
||||
# User Simone Gotti <simone.gotti@gmail.com>
|
||||
# Date 1300116230 -3600
|
||||
# Node ID d44150124273e6da61566e89f90b99a2ce276d86
|
||||
# Parent 8d31ac8a5aede2df525786802b24658d73748ba4
|
||||
Don't call fenced_join and fenced_leave.
|
||||
|
||||
These functions are used to ask fenced to join and leave a domain and not to connect to fenced.
|
||||
The connection to fenced is already handled by fenced_external.
|
||||
|
||||
diff -r 8d31ac8a5aed -r d44150124273 crmd/te_utils.c
|
||||
--- a/crmd/te_utils.c Sun Mar 13 13:57:35 2011 +0100
|
||||
+++ b/crmd/te_utils.c Mon Mar 14 16:23:50 2011 +0100
|
||||
@@ -151,17 +151,10 @@ tengine_stonith_notify(stonith_t *st, co
|
||||
char *target_copy = crm_strdup(target);
|
||||
crm_info("Notifing CMAN that '%s' is now fenced", target);
|
||||
|
||||
- rc = fenced_join();
|
||||
- if(rc != 0) {
|
||||
- crm_notice("Could not connect to fenced: rc=%d", rc);
|
||||
-
|
||||
- } else {
|
||||
rc = fenced_external(target_copy);
|
||||
if(rc != 0) {
|
||||
crm_err("Could not notify fenced: rc=%d", rc);
|
||||
}
|
||||
- fenced_leave();
|
||||
- }
|
||||
crm_free(target_copy);
|
||||
}
|
||||
#endif
|
102
cman-fencing-override.patch
Normal file
102
cman-fencing-override.patch
Normal file
@ -0,0 +1,102 @@
|
||||
changeset: 10609:8e50dc3e0d06
|
||||
user: Andrew Beekhof <andrew@beekhof.net>
|
||||
date: Fri Mar 18 17:12:18 2011 +0100
|
||||
files: crmd/te_utils.c
|
||||
description:
|
||||
High: cman: Correctly override existing fenced operations
|
||||
|
||||
|
||||
diff -r b4f456380f60 -r 8e50dc3e0d06 crmd/te_utils.c
|
||||
--- a/crmd/te_utils.c Thu Mar 17 09:41:25 2011 +0100
|
||||
+++ b/crmd/te_utils.c Fri Mar 18 17:12:18 2011 +0100
|
||||
@@ -146,17 +146,32 @@ tengine_stonith_notify(stonith_t *st, co
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_CMAN
|
||||
- if(rc == stonith_ok && is_cman_cluster()) {
|
||||
- int rc = 0;
|
||||
+ if(rc == stonith_ok && is_cman_cluster()) {
|
||||
+ int local_rc = 0;
|
||||
+ FILE *confirm = NULL;
|
||||
char *target_copy = crm_strdup(target);
|
||||
- crm_info("Notifing CMAN that '%s' is now fenced", target);
|
||||
|
||||
- rc = fenced_external(target_copy);
|
||||
- if(rc != 0) {
|
||||
- crm_err("Could not notify fenced: rc=%d", rc);
|
||||
+ /* In case fenced hasn't noticed yet */
|
||||
+ local_rc = fenced_external(target_copy);
|
||||
+ if(local_rc != 0) {
|
||||
+ crm_err("Could not notify CMAN that '%s' is now fenced: %d", target, local_rc);
|
||||
+ } else {
|
||||
+ crm_notice("Notified CMAN that '%s' is now fenced", target);
|
||||
+ }
|
||||
+
|
||||
+ /* In case fenced is already trying to shoot it */
|
||||
+ confirm = fopen("/var/run/cluster/fenced_override", "w");
|
||||
+ if(confirm) {
|
||||
+ local_rc = fprintf(confirm, "%s\n", target_copy);
|
||||
+ if(local_rc < strlen(target_copy)) {
|
||||
+ crm_err("Confirmation of CMAN fencing event for '%s' failed: %d", target, local_rc);
|
||||
+ } else {
|
||||
+ crm_notice("Confirmed CMAN fencing event for '%s'", target);
|
||||
}
|
||||
- crm_free(target_copy);
|
||||
- }
|
||||
+ fflush(confirm);
|
||||
+ fclose(confirm);
|
||||
+ }
|
||||
+ }
|
||||
#endif
|
||||
|
||||
if(rc == stonith_ok && safe_str_eq(target, origin)) {
|
||||
changeset: 10610:c6a01b02950b
|
||||
tag: master
|
||||
tag: tip
|
||||
user: Andrew Beekhof <andrew@beekhof.net>
|
||||
date: Sat Mar 19 10:50:21 2011 +0100
|
||||
files: mcp/corosync.c mcp/pacemaker.c mcp/pacemaker.h
|
||||
description:
|
||||
High: cman: We need to run the crmd as root for CMAN so that we can ACK fencing operations
|
||||
|
||||
|
||||
diff -r 8e50dc3e0d06 -r c6a01b02950b mcp/corosync.c
|
||||
--- a/mcp/corosync.c Fri Mar 18 17:12:18 2011 +0100
|
||||
+++ b/mcp/corosync.c Sat Mar 19 10:50:21 2011 +0100
|
||||
@@ -641,6 +641,7 @@ gboolean read_config(void)
|
||||
if(safe_str_eq("quorum_cman", value)) {
|
||||
#ifdef SUPPORT_CMAN
|
||||
setenv("HA_cluster_type", "cman", 1);
|
||||
+ enable_crmd_as_root(TRUE);
|
||||
use_cman = TRUE;
|
||||
#else
|
||||
crm_err("Corosync configured for CMAN but this build of Pacemaker doesn't support it");
|
||||
diff -r 8e50dc3e0d06 -r c6a01b02950b mcp/pacemaker.c
|
||||
--- a/mcp/pacemaker.c Fri Mar 18 17:12:18 2011 +0100
|
||||
+++ b/mcp/pacemaker.c Sat Mar 19 10:50:21 2011 +0100
|
||||
@@ -79,6 +79,15 @@ static pcmk_child_t pcmk_children[] = {
|
||||
|
||||
static gboolean start_child(pcmk_child_t *child);
|
||||
|
||||
+void enable_crmd_as_root(gboolean enable)
|
||||
+{
|
||||
+ if(enable) {
|
||||
+ pcmk_children[pcmk_child_crmd].uid = NULL;
|
||||
+ } else {
|
||||
+ pcmk_children[pcmk_child_crmd].uid = CRM_DAEMON_USER;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void enable_mgmtd(gboolean enable)
|
||||
{
|
||||
if(enable) {
|
||||
diff -r 8e50dc3e0d06 -r c6a01b02950b mcp/pacemaker.h
|
||||
--- a/mcp/pacemaker.h Fri Mar 18 17:12:18 2011 +0100
|
||||
+++ b/mcp/pacemaker.h Sat Mar 19 10:50:21 2011 +0100
|
||||
@@ -57,4 +57,5 @@ extern gboolean update_node_processes(ui
|
||||
|
||||
extern char *get_local_node_name(void);
|
||||
extern void enable_mgmtd(gboolean enable);
|
||||
+extern void enable_crmd_as_root(gboolean enable);
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -up doc/Pacemaker_Explained/en-US/Book_Info.xml doc/Pacemaker_Explained/en-US/Book_Info.xml
|
||||
--- doc/Pacemaker_Explained/en-US/Book_Info.xml 2010-05-12 10:45:54.000000000 +0200
|
||||
+++ doc/Pacemaker_Explained/en-US/Book_Info.xml 2010-06-10 11:52:07.000000000 +0200
|
||||
@@ -28,8 +28,7 @@
|
||||
<corpauthor>
|
||||
<inlinemediaobject>
|
||||
<imageobject>
|
||||
- <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG">
|
||||
- </imagedata>
|
||||
+ <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"/>
|
||||
</imageobject>
|
||||
</inlinemediaobject>
|
||||
</corpauthor>
|
23
pacemaker-multilib-header.patch
Normal file
23
pacemaker-multilib-header.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -r c6a01b02950b include/crm_config.h.in
|
||||
--- a/include/crm_config.h.in Sat Mar 19 10:50:21 2011 +0100
|
||||
+++ b/include/crm_config.h.in Fri Mar 25 18:34:59 2011 +0100
|
||||
@@ -36,9 +36,6 @@
|
||||
/* Where to keep CIB configuration files */
|
||||
#undef CRM_CONFIG_DIR
|
||||
|
||||
-/* Location for Pacemaker daemons */
|
||||
-#undef CRM_DAEMON_DIR
|
||||
-
|
||||
/* Group to run Pacemaker daemons as */
|
||||
#undef CRM_DAEMON_GROUP
|
||||
|
||||
@@ -69,9 +66,6 @@
|
||||
/* Compatability alias for SUPPORT_COROSYNC */
|
||||
#undef AIS_COROSYNC
|
||||
|
||||
-/* Correct printf format for logging uint64_t */
|
||||
-#undef U64T
|
||||
-
|
||||
/* Use g_hash_table compatibility functions */
|
||||
#undef USE_GHASH_COMPAT
|
||||
|
@ -20,8 +20,8 @@
|
||||
# We generate some docs using Publican, but its not available everywhere
|
||||
%bcond_with publican
|
||||
|
||||
%global specversion 5
|
||||
%global upstream_version Pacemaker-1.1.4
|
||||
%global specversion 1
|
||||
%global upstream_version Pacemaker-1.1.5
|
||||
%global upstream_prefix Pacemaker-1-1-
|
||||
|
||||
# Keep around for when/if required
|
||||
@ -39,12 +39,19 @@
|
||||
|
||||
Name: pacemaker
|
||||
Summary: Scalable High-Availability cluster resource manager
|
||||
Version: 1.1.4
|
||||
Release: %{pcmk_release}.1
|
||||
Version: 1.1.5
|
||||
Release: %{pcmk_release}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
Url: http://www.clusterlabs.org
|
||||
Group: System Environment/Daemons
|
||||
Source0: http://hg.clusterlabs.org/pacemaker/1.1/archive/%{upstream_version}.tar.bz2
|
||||
Patch3: cman-fencing-ack.patch
|
||||
Patch4: cman-dispatch-all.patch
|
||||
Patch5: cman-disconnect.patch
|
||||
Patch6: cman-fencing-override.patch
|
||||
Patch7: pacemaker-multilib-header.patch
|
||||
Patch8: stonith-manpage.patch
|
||||
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
AutoReqProv: on
|
||||
Requires(pre): cluster-glue
|
||||
@ -57,7 +64,7 @@ BuildRequires: glib2-devel cluster-glue-libs-devel libxml2-devel libxslt-devel
|
||||
BuildRequires: pkgconfig python-devel gcc-c++ bzip2-devel gnutls-devel pam-devel
|
||||
|
||||
# Enables optional functionality
|
||||
BuildRequires: help2man ncurses-devel openssl-devel libselinux-devel
|
||||
BuildRequires: help2man ncurses-devel openssl-devel libselinux-devel docbook-style-xsl resource-agents
|
||||
|
||||
%if %{with esmtp}
|
||||
BuildRequires: libesmtp-devel
|
||||
@ -169,6 +176,12 @@ resource health.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{upstream_prefix}%{upstream_version}
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
@ -182,6 +195,7 @@ resource health.
|
||||
%{?with_profiling: --with-profiling} \
|
||||
%{?with_gcov: --with-gcov} \
|
||||
%{?with_tracedata --with-tracedata} \
|
||||
--with-version=%{version}-%{release} \
|
||||
--docdir=%{pcmk_docdir} \
|
||||
--localstatedir=%{_var} \
|
||||
--with-initdir=%{_initddir} \
|
||||
@ -220,6 +234,15 @@ rm -f %{buildroot}/usr/lib/ocf/resource.d/pacemaker/pingd
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add pacemaker || :
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service pacemaker stop &>/dev/null || :
|
||||
/sbin/chkconfig --del pacemaker || :
|
||||
fi
|
||||
|
||||
%post -n pacemaker-libs -p /sbin/ldconfig
|
||||
|
||||
%postun -n pacemaker-libs -p /sbin/ldconfig
|
||||
@ -318,6 +341,9 @@ rm -rf %{buildroot}
|
||||
%doc AUTHORS
|
||||
|
||||
%changelog
|
||||
* Wed Apr 27 2011 Andrew Beekhof <andrew@beekhof.net> 1.1.5-1
|
||||
- New upstream release plus patches for CMAN integration
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-5.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
70cd738910eb657b7d8910edd509ebf5 Pacemaker-1.1.4.tar.bz2
|
||||
131c5fbf0adf3e34324198f139f2e8ea Pacemaker-1.1.5.tar.bz2
|
||||
|
27
stonith-manpage.patch
Normal file
27
stonith-manpage.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -r 39bbb85636f1 fencing/Makefile.am
|
||||
--- a/fencing/Makefile.am Tue Apr 26 09:43:57 2011 +0200
|
||||
+++ b/fencing/Makefile.am Wed Apr 27 12:00:39 2011 +0200
|
||||
@@ -26,14 +26,19 @@ halib_PROGRAMS = stonithd stonith-test
|
||||
sbin_PROGRAMS = stonith_admin
|
||||
sbin_SCRIPTS = fence_legacy
|
||||
|
||||
-if BUILD_HELP
|
||||
-man8_MANS = $(sbin_PROGRAMS:%=%.8) fence_legacy.8 stonithd.8
|
||||
+man8_MANS =
|
||||
+
|
||||
+if BUILD_XML_HELP
|
||||
+man8_MANS += stonithd.8
|
||||
stonithd.xml: stonithd
|
||||
- $(top_builddir)/fencing/$< metadata | $(XSLTPROC) --nonet --novalid --stringparam man.name $< $(top_srcdir)/xml/ocf-meta2man.xsl - > $(top_builddir)/crmd/$@
|
||||
+ $(top_builddir)/fencing/$< metadata | $(XSLTPROC) --nonet --novalid --stringparam man.name $< $(top_srcdir)/xml/ocf-meta2man.xsl - > $(top_builddir)/fencing/$@
|
||||
|
||||
stonithd.8: stonithd.xml
|
||||
- $(XSLTPROC) $(MANPAGE_XSLT) $(top_builddir)/crmd/$<
|
||||
+ $(XSLTPROC) $(MANPAGE_XSLT) $(top_builddir)/fencing/$<
|
||||
+endif
|
||||
|
||||
+if BUILD_HELP
|
||||
+man8_MANS += $(sbin_PROGRAMS:%=%.8) fence_legacy.8
|
||||
%.8: %
|
||||
echo Creating $@
|
||||
chmod a+x $<
|
Loading…
Reference in New Issue
Block a user