Bug 1078363

Summary: Handle corosync initialization timeout in init script
Product: Red Hat Enterprise Linux 7 Reporter: Jan Friesse <jfriesse>
Component: corosyncAssignee: Jan Friesse <jfriesse>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: ccaulfie, cluster-maint, djansa, fdinitto, jkortus
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: corosync-2.3.3-3.el7 Doc Type: Bug Fix
Doc Text:
Cause: Token timeout set to large value (>= 10 sec) Consequence: Corosync may need longer time to create initial membership. Init script (unit file) waits for initial membership for maximum of 10 seconds so init script returns error. User is unable to change 10 second timeout. Fix: Make waiting for initial membership configurable and increase default value to 60 sec. Result: User can set initial membership timeout in init script and default value is larger.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 08:26:51 UTC Type: Bug
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: 1113520    
Attachments:
Description Flags
init: Make init script configurable
none
init: change return value when starting corosync none

Description Jan Friesse 2014-03-19 16:35:45 UTC
Description of problem:
Current init script has default 10 seconds (20 * 0.5 sec) wait time until corosync is up and it's able to reply. This value may be too small for environments where token needs to be set to larger value.

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

How reproducible:
100%

Actual results:
If corosync is unable to create membership in 10 sec, service is restarted.

Expected results:
Make init script configurable and/or come with automatic way how to set default.

Additional info:

Comment 1 Jan Friesse 2014-06-09 13:50:50 UTC
Created attachment 904666 [details]
init: Make init script configurable

Init script loads /etc/sysconfig/corosync (or /etc/defaults/corosync) by
default, but it didn't existed by default and also no options was
defined.

Patch adds COROSYNC_INIT_TIMEOUT (how many seconds to wait for ipc
initialization) with default value 1 minute (instead of previous 10
seconds, what may be too small value for some productions) and
COROSYNC_OPTIONS (by default empty) containing options directly
passed to corosync executable.

Specfile template is also modified to install example of init file
configuration.

Comment 2 Jan Friesse 2014-06-09 13:51:29 UTC
Created attachment 904667 [details]
init: change return value when starting corosync

When corosync is started by systemd, it would be considered
as failed because it returns a non-zero value, even though it
starts sucessfully.

Comment 3 Jan Friesse 2014-06-09 13:59:03 UTC
Unit test:

- Package should come with /etc/sysconfig/corosync file with COROSYNC_INIT_TIMEOUT set to 60.

- Init script should wait maximum for 60 seconds to create membership (allow IPC). I was testing by removal of corosync execution line in init script.

- After changing COROSYNC_INIT_TIMEOUT, corosync should wait for maximum for configured amount of seconds (again tested by removal of corosync execution line)

Comment 7 errata-xmlrpc 2015-03-05 08:26:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0365.html