Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 623377 Details for
Bug 704582
Under some circumstances the cluster fail to relocate Apache Httpd and the service become unavailable.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch
0001-resource-agents-Improve-PID-file-checking.patch (text/plain), 2.11 KB, created by
Marek Grac
on 2012-10-08 10:11:39 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Marek Grac
Created:
2012-10-08 10:11:39 UTC
Size:
2.11 KB
patch
obsolete
>From aea46e9d5c22a291c382d79fbb40664de8f5be71 Mon Sep 17 00:00:00 2001 >From: Marek 'marx' Grac <mgrac@redhat.com> >Date: Mon, 8 Oct 2012 12:06:46 +0200 >Subject: [PATCH] resource-agents: Improve PID file checking > >Function check_pid_file accepts new argument > check_pid_file pid_file cmdline_substring > e.g. check_pid_file /var/run/httpd/httpd.pid "/httpd$" >This way we can be sure that PID file points to correct application, this can occurs in case >of hard reboots when applications do not have time to properly switch off. After reboot other >application can reuse this PID file. > >This commit changes only library (backward-compatibility change) and httpd resource-agent. > >Resolves: rhbz#704582 >--- > rgmanager/src/resources/apache.sh | 2 +- > rgmanager/src/resources/utils/config-utils.sh | 10 ++++++++++ > 2 files changed, 11 insertions(+), 1 deletions(-) > >diff --git a/rgmanager/src/resources/apache.sh b/rgmanager/src/resources/apache.sh >index a428780..12ca780 100755 >--- a/rgmanager/src/resources/apache.sh >+++ b/rgmanager/src/resources/apache.sh >@@ -176,7 +176,7 @@ start() > > create_pid_directory > create_conf_directory "$APACHE_conf_dir" >- check_pid_file "$APACHE_pid_file" >+ check_pid_file "$APACHE_pid_file" "/httpd$" > > if [ $? -ne 0 ]; then > clog_check_pid $CLOG_FAILED "$APACHE_pid_file" >diff --git a/rgmanager/src/resources/utils/config-utils.sh b/rgmanager/src/resources/utils/config-utils.sh >index 55e60a6..44bd7a7 100644 >--- a/rgmanager/src/resources/utils/config-utils.sh >+++ b/rgmanager/src/resources/utils/config-utils.sh >@@ -256,6 +256,7 @@ create_conf_directory() > > check_pid_file() { > declare pid_file="$1" >+ declare cmd_substring="$2" > > if [ -z "$pid_file" ]; then > return 1; >@@ -279,5 +280,14 @@ check_pid_file() { > return 0; > fi > >+ ## check if PID belongs to correct process >+ cmdline_check=`cat /proc/$pid/cmdline | tr '\0' '\n' | grep -e "$cmd_substring" > /dev/null; echo $?` >+ >+ if [ ! -z "$cmd_substring" ] && [ $cmdline_check -eq 1 ]; then >+ rm "$pid_file" >+ ocf_log debug "PID File \"$pid_file\" Was Removed - PID Is Used By Different Process"; >+ return 0; >+ fi >+ > return 1; > } >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mgrac
: review?
Actions:
View
|
Diff
Attachments on
bug 704582
: 623377