Group, I was not sure if the question was for the dev group or the user group. Please forgive me if I posted to the wrong group. I am attempting to manipulate an attr value similar to that of pingd. I am using heartbeat-2.1.3-22.1 with pacemaker-heartbeat-0.6.5-8.1(also installed are heartbeat-common, heartbeat-resources, and heartbeat-devel). I have two questions. First is the use of ha_clustermsg to send a message to attrd. The second has to do with building "C" code that uses the IPC interface and the RPMs required to do so. First question, I sent the message using (run as root with "apiauth me uid=root" in the ha.cf": ha_clustermsg <<-!MSG t=attrd src=me task=update attr_name=myAttr attr_value=100 attr_dampening=5s dest=thisNode !MSG I did not see anything happening in the CIB or the logs. I set "debug 3" in the ha.cf and found that message was received and dispatched to attrd. What I found was that attrd_ha_callback() calls find_hash_entry(msg), which constructs a new hash entry for myAttr. The problem appears that this function did not process the attr_value from the message and left it NULL. When the hash entry is then passed to attrd_perform_update() it attempts to delete myAttr from the CIB because the value is NULL. I did not see how update_attr() would be called. Is this a bug? Should find_hash_entry() have processed the attr_value token from the message? Should I not be doing this?!? The second question has to do with building a "C" application using the heartbeat API. On my build machine, different from the target machine above, I have installed the same RPMs plus heartbeat-common-devel and pacemaker-heartbeat-devel. When I try to build code that uses the IPC calls that pingd.c uses it complains that config.h is missing. I found that config.h is created when configuring the heartbeat source package. Does this mean that if I use the IPC APIs I must build from within the heartbeat source package and not just with the "-devel" RPMs? The above shell interface is sufficient form my needs if I am able to create, update, and remove the attr with ha_clustermsg. Thanks, Fred ________________________________
Fred Meyer | DMTS | Avaya | 307 Middletown-Lincroft Road | Room 1N-219 | Lincroft, New Jersey 07738-1526 | Voice: (732) 852-2302| [EMAIL PROTECTED]
_______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
