Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 587735 - postgres-8.sh will fail to stop gracefully if there is active clients connected
postgres-8.sh will fail to stop gracefully if there is active clients connected
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager (Show other bugs)
5.3
All Linux
low Severity medium
: rc
: ---
Assigned To: Marek Grac
Cluster QE
:
Depends On:
Blocks: 612165
  Show dependency treegraph
 
Reported: 2010-04-30 14:20 EDT by Shane Bradley
Modified: 2011-01-13 18:25 EST (History)
7 users (show)

See Also:
Fixed In Version: rgmanager-2.0.52-6.11.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 612165 (view as bug list)
Environment:
Last Closed: 2011-01-13 18:25:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to send SIGQUIT to disconnect the clients (639 bytes, application/octet-stream)
2010-04-30 14:20 EDT, Shane Bradley
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0134 normal SHIPPED_LIVE rgmanager bug fix and enhancement update 2011-01-12 14:20:47 EST

  None (edit)
Description Shane Bradley 2010-04-30 14:20:08 EDT
Created attachment 410562 [details]
Patch to send SIGQUIT to disconnect the clients

Description of problem:

It there is active connections to the postgres database then a SIGTERM
will fail thus the resource will fail to stop. This can result in the
service/resource for failing over. A solution to this is send a
SIGQUIT if the SIGTERM fails. Below is documentation on postgres.

Postgres documentation on stopping the pid:
To terminate the postgres server normally, the signals SIGTERM,
SIGINT, or SIGQUIT can be used. The first will wait for all clients to
terminate before quitting, the second will forcefully disconnect all
clients, and the third will quit immediately without proper shutdown,
resulting in a recovery run during restart.

Sample error message that is created:
Apr 28 13:23:46 rh5node-single clurgmgrd[3094]: <notice> Stopping service service:psql 
Apr 28 13:23:47 rh5node-single clurgmgrd: [3094]: <debug> Verifying Configuration Of postgres-8:postgresql 
Apr 28 13:23:47 rh5node-single clurgmgrd: [3094]: <debug> Verifying Configuration Of postgres-8:postgresql > Succeed 
Apr 28 13:23:47 rh5node-single clurgmgrd: [3094]: <info> Stopping Service postgres-8:postgresql 
Apr 28 13:24:49 rh5node-single clurgmgrd: [3094]: <err> Stopping Service postgres-8:postgresql > Failed - Application Is Still Running 
Apr 28 13:24:49 rh5node-single clurgmgrd: [3094]: <err> Stopping Service postgres-8:postgresql > Failed 
Apr 28 13:24:49 rh5node-single clurgmgrd[3094]: <notice> stop on postgres-8 "postgresql" returned 1 (generic error) 
Apr 28 13:24:49 rh5node-single clurgmgrd: [3094]: <info> Removing IPv4 address 192.168.1.56/24 from eth1 
Apr 28 13:24:59 rh5node-single clurgmgrd[3094]: <crit> #12: RG service:psql failed to stop; intervention required 
Apr 28 13:24:59 rh5node-single clurgmgrd[3094]: <notice> Service service:psql is failed 

Version-Release number of selected component (if applicable):
rgmanager-2.0.52-6.el5

How reproducible:
Everytime

Steps to Reproduce:
1. Start up a postgres-8.sh resource contained in a service
2. Open an active connection to the database
3. Stop the postgres-8.sh resource contained in a service
  
Actual results:

The postgres-8.sh resource will fail to stop gracefully this can lead
to a service not failing over correctly.

Expected results:
The postgres-8.sh service gracefully stop and allow failover to occur.

Additional info:

Patch is attached to fix issue by sending SIGQUIT to postgres pid if
the SIGTERM kill fails.
Comment 2 Ricardo Arguello 2010-07-02 16:03:11 EDT
I was having the same problem and tried your patch. I can confirm it works, thanks.
Comment 3 Marek Grac 2010-07-16 07:40:40 EDT
Hi,

Shane thanks for a patch, I have created a new one which is very similar but implements it in a way that other resource agents can use this functionality too. Patch is available in upstream now:

http://git.fedorahosted.org/git/?p=cluster.git;a=commit;h=87863e2c83b8cc3f6d7cb6b657202e04bd2df40f
Comment 8 errata-xmlrpc 2011-01-13 18:25:43 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0134.html

Note You need to log in before you can comment on or make changes to this bug.