Hi,
There is a discussion about a feature that "crm_mon" displays
the failcount in this list before,
http://www.gossamer-threads.com/lists/linuxha/users/47607
I'm trying to implement it now. It's working.
To start with, I look into the "crm_mon" code.
When crm_mon get executed with html mode,
cl_perror function will be always called and complain about opening a file.
See attached patch.
It is made for Pacemaker-0.6 (fd8904c9bc67).
And if crm_mon actually fails to open a file,
We can see some error messages, but the exit code of crm_mon itself will
be "0" as no error.
It's kind of odd.
Best Regards,
Satomi Taniguchi
diff -r fd8904c9bc67 crm/admin/crm_mon.c
--- a/crm/admin/crm_mon.c Wed Apr 23 11:33:07 2008 +0200
+++ b/crm/admin/crm_mon.c Thu Apr 24 09:46:55 2008 +0900
@@ -616,8 +616,8 @@ print_html_status(crm_data_t *cib, const
} else {
filename_tmp = crm_concat(filename, "tmp", '.');
stream = fopen(filename_tmp, "w");
- cl_perror("Cannot open %s for writing", filename_tmp);
if(stream == NULL) {
+ cl_perror("Cannot open %s for writing", filename_tmp);
crm_free(filename_tmp);
return -1;
}
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems