Hide Forgot
We're using 'corosync-cfgtool -R' inside of pcs to reload the corosync.conf file, but if we try to load a bad corosync.conf 'corosync-cfgtool -R' doesn't let us know. It looks like the only way we can tell of the reload fails is if we look in the system logs. Is it possible to have corosync-cfgtool -R provide different output if the reload fails? If not, then we can just close this bug.
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.