Bug 607744

Summary: remove delay on normal shutdown of corosync server and return error to library user
Product: [Fedora] Fedora Reporter: Steven Dake <sdake>
Component: corosyncAssignee: Jan Friesse <jfriesse>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: 2clarkd, agk, fdinitto, sdake
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 639023 (view as bug list) Environment:
Last Closed: 2010-10-12 13:04:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 639023    
Attachments:
Description Flags
test app which reproduces delay
none
Proposed patch none

Description Steven Dake 2010-06-24 17:26:03 UTC
Description of problem:
if corosync service is shutdown, client libraries wait 2 seconds before returning an error.  A different approach to this problem would be to set a variable in the control_buffer global area indicating the server has exited and sem_post on the all the semaphores in the system during conn_info_destroy.

Check the value of the exited flag before and after sem_wait.  If the exited flag is true, return ERR_LIBRARY

Version-Release number of selected component (if applicable):
corosync-1.2.5

How reproducible:
100%

Steps to Reproduce:
1. test case attached
2. run service corosync restart in a loop
3.
  
Actual results:
two second delay if corosync is shutdown normally

Expected results:
no delay if corosync is shutdown

Additional info:

Comment 1 Steven Dake 2010-06-24 17:27:45 UTC
Created attachment 426658 [details]
test app which reproduces delay

Comment 3 Bug Zapper 2010-07-30 12:13:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Jan Friesse 2010-09-07 15:55:50 UTC
Created attachment 443547 [details]
Proposed patch

Proposed solution implemented in practice.

Comment 5 Jan Friesse 2010-10-12 13:04:34 UTC
Patch committed to SVN as revision 3059. Closing as upstream.