diff --git a/.gitignore b/.gitignore index e2628cc..a5c0bd6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /Pacemaker-1.1.5.tar.bz2 /Pacemaker-1.1.6.tar.bz2 /ClusterLabs-pacemaker-89678d4.tar.gz +/ClusterLabs-pacemaker-bc7c125.tar.gz diff --git a/cman-disconnect.patch b/cman-disconnect.patch deleted file mode 100644 index c92477d..0000000 --- a/cman-disconnect.patch +++ /dev/null @@ -1,67 +0,0 @@ -exporting patch: -# HG changeset patch -# User Andrew Beekhof -# 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 - #include -+#include "../lib/common/stack.h" - - #include - #include -@@ -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; diff --git a/cman-dispatch-all.patch b/cman-dispatch-all.patch deleted file mode 100644 index 6f41ece..0000000 --- a/cman-dispatch-all.patch +++ /dev/null @@ -1,20 +0,0 @@ -# HG changeset patch -# User Simone Gotti -# 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; diff --git a/cman-fencing-ack.patch b/cman-fencing-ack.patch deleted file mode 100644 index db51592..0000000 --- a/cman-fencing-ack.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Simone Gotti -# 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 diff --git a/cman-fencing-override.patch b/cman-fencing-override.patch deleted file mode 100644 index ab75613..0000000 --- a/cman-fencing-override.patch +++ /dev/null @@ -1,102 +0,0 @@ -changeset: 10609:8e50dc3e0d06 -user: Andrew Beekhof -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 -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); - - diff --git a/pacemaker.spec b/pacemaker.spec index e24bbf7..a4c285a 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -2,8 +2,8 @@ %global uname hacluster %global pcmk_docdir %{_docdir}/%{name} -%global specversion 3 -%global upstream_version 89678d4 +%global specversion 1 +%global upstream_version bc7c125 %global upstream_prefix ClusterLabs-pacemaker # Compatibility macros for distros (fedora) that don't provide Python macros by default @@ -20,12 +20,15 @@ %{!?with: %{expand: %%global with() %%{expand:%%%%{?with_%%{1}:1}%%%%{!?with_%%{1}:0}}}} %{!?without: %{expand: %%global without() %%{expand:%%%%{?with_%%{1}:0}%%%%{!?with_%%{1}:1}}}} +%global cs_major %(pkg-config corosync --modversion | awk -F . '{print $1}') +%global cs_minor %(pkg-config corosync --modversion | awk -F . '{print $2}') + # Conditionals # Invoke "rpmbuild --without " or "rpmbuild --with " # to disable or enable specific features # Supported cluster stacks, must support at least one -%bcond_without cman +%bcond_with cman %bcond_without doc %bcond_without corosync %bcond_with heartbeat @@ -46,7 +49,7 @@ %bcond_without publican # Use a different versioning scheme -%bcond_with pre_release +%bcond_without pre_release %if %{with profiling} # This disables -debuginfo package creation and also the stripping binaries/libraries @@ -62,8 +65,8 @@ Name: pacemaker Summary: Scalable High-Availability cluster resource manager -Version: 1.1.6 -Release: %{pcmk_release}%{?dist}.1 +Version: 1.1.7 +Release: %{pcmk_release}%{?dist} License: GPLv2+ and LGPLv2+ Url: http://www.clusterlabs.org Group: System Environment/Daemons @@ -91,7 +94,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: ncurses-devel openssl-devel libselinux-devel docbook-style-xsl resource-agents +BuildRequires: ncurses-devel openssl-devel libselinux-devel docbook-style-xsl resource-agents libqb-devel %if %{with cman} @@ -270,7 +273,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig install -m 644 mcp/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker # Scripts that should be executable -chmod a+x %{buildroot}/%{_libdir}/heartbeat/hb2openais-helper.py +chmod a+x %{buildroot}/%{_libexecdir}/pacemaker/hb2openais-helper.py chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/CTSlab.py chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/extracttests.py @@ -285,9 +288,8 @@ find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f # Do not package these either -rm -f %{buildroot}/%{_libdir}/heartbeat/hb2openais-helper.* -rm -f %{buildroot}/%{_libdir}/heartbeat/crm_primitive.* -rm -f %{buildroot}/%{_libdir}/heartbeat/atest +rm -f %{buildroot}/%{_libexecdir}/pacemaker/hb2openais-helper.* +rm -f %{buildroot}/%{_libexecdir}/pacemaker/crm_primitive.* rm -f %{buildroot}/%{_libdir}/service_crm.so %if %{with gcov} @@ -337,6 +339,7 @@ fi %{_datadir}/pacemaker %{_datadir}/snmp/mibs/PCMK-MIB.txt %{_libdir}/heartbeat/* +%{_libexecdir}/pacemaker/* %{_sbindir}/crm_attribute %{_sbindir}/crm_master @@ -377,8 +380,12 @@ fi %dir /usr/lib/ocf/resource.d /usr/lib/ocf/resource.d/pacemaker %if %{with corosync} +%if 0%{?cs_major} < 2 +%if 0%{?cs_minor} < 8 %{_libexecdir}/lcrso/pacemaker.lcrso %endif +%endif +%endif %files cli %defattr(-,root,root) @@ -457,6 +464,11 @@ fi %doc AUTHORS %changelog +* Thu Feb 02 2012 Andrew Beekhof 1.1.7-0.1-bc7c125.git +- New upstream tarball: bc7c125 +- Pre-release 1.1.7 build to deal with the removal of cman and support for corosync plugins +- Add libqb as a dependancy + * Fri Jan 13 2012 Fedora Release Engineering - 1.1.6-3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index a07e799..b5be63f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f3f5a66cc7c8f4a3104f66942c14b618 ClusterLabs-pacemaker-89678d4.tar.gz +693012e4e78f8dd014ce8d99efb97da8 ClusterLabs-pacemaker-bc7c125.tar.gz