Thanks Andrew, The addrd_updater is just what I was looking for. I think I should be able to use it directly.
I have installed heartbeat-2.1.3-22.1 with pacemaker-heartbeat-0.6.5-8.1 (also installed heartbeat-common, heartbeat-resources) on my target machine. I did not find attrd_updater in /usr/lib/heartbeat. I see that attrd_updater.c is in both the heartbeat and pacemaker-heartbeat source rpms. I assume the pacemaker-heartbeat is the one that should be used. Question: I am new to "rpmbuild" and did not know how to configure heartbeat and pacemaker-heartbeat to build them to be used together for RHEL5? After that I would need to enable attrd_updater to be built also. Thank you, Fred -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Beekhof Sent: Monday, August 04, 2008 7:21 AM To: High-Availability Linux Development List Subject: Re: [Linux-ha-dev] problem with ha_clustermsg to attrd 2008/7/29 Meyer, Fred H (Fred) <[EMAIL PROTECTED]>: > 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 last one. If you want to know how to interact with attrd programatically, look at the source for attrd_updater _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
