Bug 244469 - CPG: bad elements in in member_list for cpg_confchg_fn
Summary: CPG: bad elements in in member_list for cpg_confchg_fn
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openais
Version: 5.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Steven Dake
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-15 21:42 UTC by Jonathan Earl Brassow
Modified: 2016-04-26 15:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-15 22:45:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jonathan Earl Brassow 2007-06-15 21:42:01 UTC
In my cpg_confchg_fn callback function:

	LOG_PRINT("* MEMBERS:");
	for (i = 0; i < member_list_entries; i++)
		LOG_PRINT("*   %d", member_list[i].nodeid);
	LOG_PRINT("* LEAVING:");

Output:
Jun 15 16:27:46 jb-xen-03 clogd[2141]: * MEMBERS:
Jun 15 16:27:46 jb-xen-03 clogd[2141]: *   3
Jun 15 16:27:46 jb-xen-03 clogd[2141]: *   3
Jun 15 16:27:46 jb-xen-03 clogd[2141]: *   3
Jun 15 16:27:46 jb-xen-03 clogd[2141]: * LEAVING:

Comment 1 Steven Dake 2007-06-15 22:45:18 UTC
i ran testcpg on the machines and testcpg works properly.  I then suspected that
logging.c/logging.h from cmirror has some problem so I copied over that code
into my testcpg program.  I copied the config logging messages into testcpg on
xen03 and replaced LOG_PRINT with printf and receive the following output:
[root@jb-xen-03 test]# ./testcpg
Type EXIT to finish
* CPG config callback *********************
* JOINING (1):
*   nodeid: 3, pid: 2815
* MEMBERS (3):
*   nodeid: 3, pid: 2815
*   nodeid: 2, pid: 2656
*   nodeid: 1, pid: 2656
* LEAVING (0):
*****************************************


whereas

the log output with LOG_PRINT being used in testcpg contains:


Since these dont match and regular printf is pretty simple, this seems to
indicate an error in the logging.c code in cmirror.
Jun 15 17:42:20 jb-xen-03 clogd[2815]: * CPG config callback *********************
Jun 15 17:42:20 jb-xen-03 clogd[2815]: * JOINING (1):
Jun 15 17:42:20 jb-xen-03 clogd[2815]: *   nodeid: 3, pid: 2815
Jun 15 17:42:20 jb-xen-03 clogd[2815]: * MEMBERS (3):
Jun 15 17:42:20 jb-xen-03 clogd[2815]: *   nodeid: 3, pid: 2815
Jun 15 17:42:20 jb-xen-03 last message repeated 2 times
Jun 15 17:42:20 jb-xen-03 clogd[2815]: * LEAVING (0):
Jun 15 17:42:20 jb-xen-03 clogd[2815]: *****************************************

The code with both log output methods (logging.c and also printf) is contained
on the xen-03 node.

Regards
-steve


Note You need to log in before you can comment on or make changes to this bug.