Bug 1031832
Summary: | corosync-cfgtool -R (reload of corosync.conf) doesn't return status if the config file is invalid | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Chris Feist <cfeist> | ||||||
Component: | corosync | Assignee: | Jan Friesse <jfriesse> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Cluster QE <mspqa-list> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 7.0 | CC: | ccaulfie, cfeist, cluster-maint, jkortus | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | corosync-2.3.2-3.el7 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause:
corosync-cfgtool -R is unsuccessful.
Consequence:
Return code ($?) is 0.
Fix:
Properly set return code if failure happens.
Result:
Unsuccessful corosync-cfgtool -R returns code != 0.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-06-13 12:10:45 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: | 998883 | ||||||||
Attachments: |
|
Description
Chris Feist
2013-11-18 22:19:19 UTC
Chris, I'm was trying this: - Exec corosync - edit corosync.conf and put "}" line on first line of config file (this is invalid because there is no preceding start of section) - corosync-cfgtool -R -> Reloading corosync.conf... Could not reload configuration 2 and "echo $?" == 0 The return code is definitively problem and should be fixed. But even without this fix, corosync-cfgtool -R output is parseable so there is really no need to watch logs. Or do I missing something? In short. Is proper return code (> 0) enough to fix this BZ or something more is needed? Created attachment 826082 [details]
Proposed patch - return error on reload failure
Created attachment 829309 [details]
Proposed patch take 2 - return error on reload failure
Jan, I was just adding garbage at the beginning of the file, but it looks like corosync ignores that (which is why I didn't see an error message). I tried adding garbage to the middle of the file and I saw the error message. A return code > 0 would work perfectly for me (then I don't need to worry if the error message ever changes). Your patch looks like it does exactly what I need. (In reply to Chris Feist from comment #5) > Jan, > > I was just adding garbage at the beginning of the file, but it looks like > corosync ignores that (which is why I didn't see an error message). I tried > adding garbage to the middle of the file and I saw the error message. > > A return code > 0 would work perfectly for me (then I don't need to worry if > the error message ever changes). > > Your patch looks like it does exactly what I need. Ok, cool. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |