| Summary: | inability to read/write a file should not print parse error, but instead print that the file couldn't be read/written | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Steven Dake <sdake> | ||||
| Component: | corosync | Assignee: | Jan Friesse <jfriesse> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.2 | CC: | ccaulfie, cluster-maint, cmarthal, dwalsh, jkortus, lhh, rpeterso, teigland | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | corosync-1.4.1-6.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Cause
Set logging to file if path to file contains nonexisting directory.
Consequence
Error message which doesn't make sense (configuration file error)
Fix
Pass proper string pointer to function for opening log file
Result
Correct error message (can't create log file) is displayed.
|
Story Points: | --- | ||||
| Clone Of: | 741434 | Environment: | |||||
| Last Closed: | 2012-06-20 12:22:37 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | 741434 | ||||||
| Bug Blocks: | 756082 | ||||||
| Attachments: |
|
||||||
|
Description
Steven Dake
2011-09-26 20:59:17 UTC
An inability to read a config or operational file (because of selinux for example) should give a more useful error then a parse error. Instead the filename with an appropriate error should be printed. Created attachment 559020 [details]
Proposed patch
Main problem wasn't hidden in coroparse (parser) but in mainconfig module, which passed incorrect string pointer to function which opens log file. Patch handles this by passing correct string to function, so correct error is now printed.
Reproducer:
set logfile: in corosync.conf to some non-existing directory. Example: logfile: /var/log/cluster2/corosync.log
run corosync.
Old result:
As described in bz
New result:
Feb 02 10:47:24 corosync [MAIN ] parse error in config: Can't open logfile '/var/log/cluster2/corosync.log' for reason: No such file or directory (2).
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Cause
Set logging to file if path to file contains nonexisting directory.
Consequence
Error message which doesn't make sense (configuration file error)
Fix
Pass proper string pointer to function for opening log file
Result
Correct error message (can't create log file) is displayed.
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. http://rhn.redhat.com/errata/RHBA-2012-0777.html |