1.1.7 pre-release for corosync 2.0
This commit is contained in:
parent
eabde33e7d
commit
f57249ff06
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
/Pacemaker-1.1.5.tar.bz2
|
/Pacemaker-1.1.5.tar.bz2
|
||||||
/Pacemaker-1.1.6.tar.bz2
|
/Pacemaker-1.1.6.tar.bz2
|
||||||
/ClusterLabs-pacemaker-89678d4.tar.gz
|
/ClusterLabs-pacemaker-89678d4.tar.gz
|
||||||
|
/ClusterLabs-pacemaker-bc7c125.tar.gz
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
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;
|
|
@ -1,20 +0,0 @@
|
|||||||
# 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;
|
|
@ -1,31 +0,0 @@
|
|||||||
# 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
|
|
@ -1,102 +0,0 @@
|
|||||||
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);
|
|
||||||
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
|||||||
%global uname hacluster
|
%global uname hacluster
|
||||||
%global pcmk_docdir %{_docdir}/%{name}
|
%global pcmk_docdir %{_docdir}/%{name}
|
||||||
|
|
||||||
%global specversion 3
|
%global specversion 1
|
||||||
%global upstream_version 89678d4
|
%global upstream_version bc7c125
|
||||||
%global upstream_prefix ClusterLabs-pacemaker
|
%global upstream_prefix ClusterLabs-pacemaker
|
||||||
|
|
||||||
# Compatibility macros for distros (fedora) that don't provide Python macros by default
|
# 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}}}}
|
%{!?with: %{expand: %%global with() %%{expand:%%%%{?with_%%{1}:1}%%%%{!?with_%%{1}:0}}}}
|
||||||
%{!?without: %{expand: %%global without() %%{expand:%%%%{?with_%%{1}:0}%%%%{!?with_%%{1}:1}}}}
|
%{!?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
|
# Conditionals
|
||||||
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
||||||
# to disable or enable specific features
|
# to disable or enable specific features
|
||||||
|
|
||||||
# Supported cluster stacks, must support at least one
|
# Supported cluster stacks, must support at least one
|
||||||
%bcond_without cman
|
%bcond_with cman
|
||||||
%bcond_without doc
|
%bcond_without doc
|
||||||
%bcond_without corosync
|
%bcond_without corosync
|
||||||
%bcond_with heartbeat
|
%bcond_with heartbeat
|
||||||
@ -46,7 +49,7 @@
|
|||||||
%bcond_without publican
|
%bcond_without publican
|
||||||
|
|
||||||
# Use a different versioning scheme
|
# Use a different versioning scheme
|
||||||
%bcond_with pre_release
|
%bcond_without pre_release
|
||||||
|
|
||||||
%if %{with profiling}
|
%if %{with profiling}
|
||||||
# This disables -debuginfo package creation and also the stripping binaries/libraries
|
# This disables -debuginfo package creation and also the stripping binaries/libraries
|
||||||
@ -62,8 +65,8 @@
|
|||||||
|
|
||||||
Name: pacemaker
|
Name: pacemaker
|
||||||
Summary: Scalable High-Availability cluster resource manager
|
Summary: Scalable High-Availability cluster resource manager
|
||||||
Version: 1.1.6
|
Version: 1.1.7
|
||||||
Release: %{pcmk_release}%{?dist}.1
|
Release: %{pcmk_release}%{?dist}
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
Url: http://www.clusterlabs.org
|
Url: http://www.clusterlabs.org
|
||||||
Group: System Environment/Daemons
|
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
|
BuildRequires: pkgconfig python-devel gcc-c++ bzip2-devel gnutls-devel pam-devel
|
||||||
|
|
||||||
# Enables optional functionality
|
# 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}
|
%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
|
install -m 644 mcp/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker
|
||||||
|
|
||||||
# Scripts that should be executable
|
# 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/CTSlab.py
|
||||||
chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/extracttests.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
|
find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
|
||||||
|
|
||||||
# Do not package these either
|
# Do not package these either
|
||||||
rm -f %{buildroot}/%{_libdir}/heartbeat/hb2openais-helper.*
|
rm -f %{buildroot}/%{_libexecdir}/pacemaker/hb2openais-helper.*
|
||||||
rm -f %{buildroot}/%{_libdir}/heartbeat/crm_primitive.*
|
rm -f %{buildroot}/%{_libexecdir}/pacemaker/crm_primitive.*
|
||||||
rm -f %{buildroot}/%{_libdir}/heartbeat/atest
|
|
||||||
rm -f %{buildroot}/%{_libdir}/service_crm.so
|
rm -f %{buildroot}/%{_libdir}/service_crm.so
|
||||||
|
|
||||||
%if %{with gcov}
|
%if %{with gcov}
|
||||||
@ -337,6 +339,7 @@ fi
|
|||||||
%{_datadir}/pacemaker
|
%{_datadir}/pacemaker
|
||||||
%{_datadir}/snmp/mibs/PCMK-MIB.txt
|
%{_datadir}/snmp/mibs/PCMK-MIB.txt
|
||||||
%{_libdir}/heartbeat/*
|
%{_libdir}/heartbeat/*
|
||||||
|
%{_libexecdir}/pacemaker/*
|
||||||
|
|
||||||
%{_sbindir}/crm_attribute
|
%{_sbindir}/crm_attribute
|
||||||
%{_sbindir}/crm_master
|
%{_sbindir}/crm_master
|
||||||
@ -377,8 +380,12 @@ fi
|
|||||||
%dir /usr/lib/ocf/resource.d
|
%dir /usr/lib/ocf/resource.d
|
||||||
/usr/lib/ocf/resource.d/pacemaker
|
/usr/lib/ocf/resource.d/pacemaker
|
||||||
%if %{with corosync}
|
%if %{with corosync}
|
||||||
|
%if 0%{?cs_major} < 2
|
||||||
|
%if 0%{?cs_minor} < 8
|
||||||
%{_libexecdir}/lcrso/pacemaker.lcrso
|
%{_libexecdir}/lcrso/pacemaker.lcrso
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%files cli
|
%files cli
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -457,6 +464,11 @@ fi
|
|||||||
%doc AUTHORS
|
%doc AUTHORS
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 02 2012 Andrew Beekhof <andrew@beekhof.net> 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 <rel-eng@lists.fedoraproject.org> - 1.1.6-3.1
|
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-3.1
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user