This site best when viewed with a modern standards-compliant browser. We recommend Firefox Get Firefox!.

Linux-HA project logo
Providing Open Source High-Availability Software for Linux and other OSes since 1999.

USA Flag UK Flag

Japanese Flag

Homepage

About Us

Contact Us

Legal Info

How To Contribute

Security Issues

This web page is no longer maintained. Information presented here exists only to avoid breaking historical links.
The Project stays maintained, and lives on: see the Linux-HA Reference Documentation.
To get rid of this notice, you may want to browse the old wiki instead.

1 February 2010 Hearbeat 3.0.2 released see the Release Notes

18 January 2009 Pacemaker 1.0.7 released see the Release Notes

16 November 2009 LINBIT new Heartbeat Steward see the Announcement

Last site update:
2017-12-16 12:21:51

issue id
CCM-01

Summary: CCM code cleanups which need doing

Created by: -- Lars Marowsky-Brée 2004-02-18 09:41:52

  • g_malloc() cannot return NULL; it will abort and dump core instead. So the checks for g_malloc() returning NULL are confusing and redundant; if error handling is desired, maybe CCM should use ha_malloc et al?

  • ccmbitmap.[ch] define functions working on bitmaps. These should however take void ** instead of char ** to avoid type casting problems.

  • ccm.c uses these bitmaps to encode and pass over the network a binary integer array. This is bound to break across systems with different endianess or different integer sizes.

  • Extra points added by AndrewBeekhof:

    • Some documentation on the functions and what the various events mean would certainly help people trying to use, modify or debug the CCM
    • The practice of declaring lists/blobs as arrays of fixed size is deceptive. For example in ccmlib.h

    typedef struct ccm_llm_s { /* information about low level membership info */
            uint       n;           //number of nodes in the cluster 
            int        mynode;       //index of mynode
            struct  node_s {
                    uint  Uuid;  /* a cluster unique id for the node */
                    char Id[NODEIDSIZE];
            } node[0];
    } ccm_llm_t;
    

    Should be

    typedef struct ccm_llm_s { /* information about low level membership info */
            uint       n;           //number of nodes in the cluster 
            int        mynode;       //index of mynode
            struct  node_s {
                    uint  Uuid;  /* a cluster unique id for the node */
                    char Id[NODEIDSIZE];
            } *node;
    } ccm_llm_t;
    
    • I understand that the standard for #defines is ALL CAPS, but the high usage of ALL CAPS is very hard on the eye.


    CategoryIssue, CategoryOpenIssue