Resolves: rhbz#915959

This commit is contained in:
David Vossel 2013-03-11 13:28:06 -05:00
parent 8f82f70bb7
commit 8021fba776
2 changed files with 44 additions and 1 deletions

View File

@ -33,7 +33,7 @@
Name: resource-agents Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 3.9.5 Version: 3.9.5
Release: 1%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} Release: 2%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
URL: http://to.be.defined.com/ URL: http://to.be.defined.com/
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
@ -43,6 +43,7 @@ Group: Productivity/Clustering/HA
%endif %endif
Source0: %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz Source0: %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
Patch0: no-cluster-glue.patch Patch0: no-cluster-glue.patch
Patch1: rhbz915959-apache-resource-pidfile-path.patch
Obsoletes: heartbeat-resources <= %{version} Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version} Provides: heartbeat-resources = %{version}
@ -147,6 +148,7 @@ exit 1
%endif %endif
%setup -q -n %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} %setup -q -n %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
if [ ! -f configure ]; then if [ ! -f configure ]; then
@ -305,6 +307,8 @@ ccs_update_schema > /dev/null 2>&1 ||:
%endif %endif
%changelog %changelog
* Mon Mar 11 2013 David Vossel <dvossel@redhat.com> - 3.9.5-2
- Resolves rhbz#915050
* Mon Mar 11 2013 David Vossel <dvossel@redhat.com> - 3.9.5-1 * Mon Mar 11 2013 David Vossel <dvossel@redhat.com> - 3.9.5-1
- New upstream release. - New upstream release.

View File

@ -0,0 +1,39 @@
diff --git a/heartbeat/apache b/heartbeat/apache
index d702765..a313372 100755
--- a/heartbeat/apache
+++ b/heartbeat/apache
@@ -173,7 +173,12 @@ apache_start() {
validate_default_config || return $OCF_ERR_CONFIGURED
# https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/603211
[ -d /var/run/apache2 ] || mkdir /var/run/apache2
- ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE
+ if [ -z $PIDFILE_DIRECTIVE ];
+ then
+ ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE
+ else
+ ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE -c "PidFile $PidFile"
+ fi
tries=0
while : # wait until the user set timeout
do
diff --git a/heartbeat/apache-conf.sh b/heartbeat/apache-conf.sh
index 12723cb..cf679cc 100644
--- a/heartbeat/apache-conf.sh
+++ b/heartbeat/apache-conf.sh
@@ -139,7 +139,15 @@ GetParams() {
case $PidFile in
/*) ;;
[[:alnum:]]*) PidFile=$ServerRoot/$PidFile;;
- *) PidFile=$HA_VARRUNDIR/${httpd_basename}.pid;;
+ *)
+ # If the PidFile is not set in the config, set
+ # a default location.
+ PidFile=$HA_VARRUNDIR/${httpd_basename}.pid
+ # Force the daemon to use this location by using
+ # the -c option, which adds the PidFile directive
+ # as if it was in the configuration file to begin with.
+ PIDFILE_DIRECTIVE="true"
+ ;;
esac
for p in "$PORT" "$Port" 80; do