[Pacemaker] Remote Access not Working

Colin colin.hch at gmail.com
Fri Nov 20 12:01:33 UTC 2009


On Fri, Nov 20, 2009 at 12:36 PM, Andrew Beekhof <andrew at beekhof.net> wrote:
> On Fri, Nov 20, 2009 at 11:17 AM, Colin <colin.hch at gmail.com> wrote:
>> - The assumption that a partial read (wrt. the buffer) signals no more
>> data is IMO not valid.
>
> It is if you didn't get a signal.

What if the number of payload bytes per IP packet is not a multiple of
the third argument to recv(), and you have a slow connection? This is
TCP, so you the data can come at any fast or slow rate. And TCP
lacking any kind of implicit record markers (not like UDP or SCTP that
have them) you normally have to look at the data to know when you're
done reading... At least that's my current understanding of [the
shortcomings of the stream-abstraction provided by] TCP.

> But I agree the code needs a cleanup.
>
> I went with: http://hg.clusterlabs.org/pacemaker/stable-1.0/rev/5acf9f2e9c9e

Great, I'll set up Mercurial and then I'll test it.

>> And that is as far as I can get with crm_mon, as it doesn't supports
>> continuous update via remote access?
>>
>> static int cib_remote_set_connection_dnotify(
>>    cib_t *cib, void (*dnotify)(gpointer user_data))
>> {
>>    return cib_NOTSUPPORTED;
>> }
>
> No, thats something else.
> Remote notifications should work, I'll test that today.

Right, this function does not seem to get used. With:

        if(full) {
          crm_debug_3("Full connect: start");
            if(rc == cib_ok) {
              crm_debug_3("Full connect: dnotify");
                rc = cib->cmds->set_connection_dnotify(cib,
mon_cib_connection_destroy);
            }

            if(rc == cib_ok) {
              crm_debug_3("Full connect: callback");
                cib->cmds->del_notify_callback(cib, T_CIB_DIFF_NOTIFY,
crm_diff_update);
                rc = cib->cmds->add_notify_callback(cib,
T_CIB_DIFF_NOTIFY, crm_diff_update);
            }

            if(rc != cib_ok) {
                print_as("Notification setup failed, could not monitor
CIB actions");
                if(as_console) { sleep(2); }
                clean_up(-rc);
            }
        }

the output of 'tools/.libs/crm_mon -VVVVVVVNrf' finishes with:

Migration summary:
* Node cluster1:
crm_mon[21188]: 2009/11/20_12:51:58 debug: debug3:
cleanup_calculations: deleting resources
crm_mon[21188]: 2009/11/20_12:51:58 debug: debug3:
cleanup_calculations: deleting actions
crm_mon[21188]: 2009/11/20_12:51:58 debug: debug3:
cleanup_calculations: deleting nodes
crm_mon[21188]: 2009/11/20_12:51:58 debug: debug3: cib_connect: Full
connect: start
crm_mon[21188]: 2009/11/20_12:51:58 debug: debug3: cib_connect: Full
connect: dnotify
crm_mon[21188]: 2009/11/20_12:51:58 debug: cib_remote_signoff: Signing
out of the CIB Service
crm_mon[21188]: 2009/11/20_12:51:58 WARN: cib_remote_free: Freeing CIB
Notification setup failed, could not monitor CIB
actionscluster1:~/Pacemaker-my# fg

Side note: Now I often get two password prompts?!?

cluster1:~/Pacemaker-my# tools/.libs/crm_mon -VNrf
Attempting connection to the cluster...Password:Password:

Thanks, Colin




More information about the Pacemaker mailing list