Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: lib by andrew from 
      ([email protected])
   2. Linux-HA CVS: tools by andrew from 
      ([email protected])
   3. Linux-HA CVS: heartbeat by andrew from 
      ([email protected])
   4. Linux-HA CVS: crm by andrew from 
      ([email protected])
   5. Linux-HA CVS: tools by andrew from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Mon, 10 Apr 2006 06:49:16 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/crm/common


Modified Files:
        utils.c 


Log Message:
Common function





------------------------------

Message: 2
Date: Mon, 10 Apr 2006 06:50:08 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : tools

Dir     : linux-ha/tools


Modified Files:
        Makefile.am 
Added Files:
        pingd.c 


Log Message:
Untested pingd - replacement for ipfail

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- Makefile.am 9 Apr 2006 17:08:18 -0000       1.16
+++ Makefile.am 10 Apr 2006 12:50:08 -0000      1.17
@@ -32,7 +32,7 @@
 habin_PROGRAMS         = cl_status cl_respawn 
 sbin_PROGRAMS          = attrd_updater
 halib_SCRIPTS          = haresources2cib.py    
-halib_PROGRAMS         = attrd 
+halib_PROGRAMS         = attrd pingd
 
 ## SOURCES
 ccdv:  $(top_srcdir)/tools/ccdv.c
@@ -65,6 +65,15 @@
                  $(GLIBLIB)                                            \
                  $(LIBRT)
 
+pingd_SOURCES          = pingd.c
+pingd_CFLAGS           = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
+pingd_LDADD            =  $(CRM_DEBUG_LIBS)                            \
+                 $(top_builddir)/lib/clplumbing/libplumb.la            \
+                 $(top_builddir)/lib/crm/common/libcrmcommon.la        \
+                 $(top_builddir)/lib/hbclient/libhbclient.la           \
+                 $(GLIBLIB)                                            \
+                 $(LIBRT)
+
 attrd_updater_SOURCES  = attrd_updater.c
 attrd_updater_CFLAGS   = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
 attrd_updater_LDADD    =  $(CRM_DEBUG_LIBS)                            \




------------------------------

Message: 3
Date: Mon, 10 Apr 2006 06:50:09 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat


Modified Files:
        config.c 


Log Message:
Untested pingd - replacement for ipfail

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/config.c,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -3 -r1.194 -r1.195
--- config.c    9 Apr 2006 12:50:04 -0000       1.194
+++ config.c    10 Apr 2006 12:50:08 -0000      1.195
@@ -1,4 +1,4 @@
-/* $Id: config.c,v 1.194 2006/04/09 12:50:04 andrew Exp $ */
+/* $Id: config.c,v 1.195 2006/04/10 12:50:08 andrew Exp $ */
 /*
  * Parse various heartbeat configuration files...
  *
@@ -2401,6 +2401,7 @@
        ,       {"apiauth", "cib        uid=" HA_CCMUSER}
        ,       {"apiauth", "crmd       uid=" HA_CCMUSER}
        ,       {"apiauth", "attrd      uid=" HA_CCMUSER}
+       ,       {"apiauth", "pingd      uid=" HA_CCMUSER}
 
        ,       {"respawn", " "HA_CCMUSER " " HALIB "/ccm"}
        ,       {"respawn", " "HA_CCMUSER " " HALIB "/cib"}
@@ -2519,6 +2520,9 @@
 
 /*
  * $Log: config.c,v $
+ * Revision 1.195  2006/04/10 12:50:08  andrew
+ * Untested pingd - replacement for ipfail
+ *
  * Revision 1.194  2006/04/09 12:50:04  andrew
  * Daemon for organising attribute updates to the CIB accross all nodes
  *   (part of the ipfail replacement code)




------------------------------

Message: 4
Date: Mon, 10 Apr 2006 06:51:13 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : crm

Dir     : linux-ha/crm/admin


Modified Files:
        crm_attribute.c 


Log Message:
attr_delete needs options

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_attribute.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- crm_attribute.c     7 Apr 2006 14:29:32 -0000       1.12
+++ crm_attribute.c     10 Apr 2006 12:51:13 -0000      1.13
@@ -1,4 +1,4 @@
-/* $Id: crm_attribute.c,v 1.12 2006/04/07 14:29:32 andrew Exp $ */
+/* $Id: crm_attribute.c,v 1.13 2006/04/10 12:51:13 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -323,7 +323,7 @@
        if(is_done) {
                        
        } else if(DO_DELETE) {
-               rc = delete_attr(the_cib, type, dest_node, set_name,
+               rc = delete_attr(the_cib, cib_sync_call, type, dest_node, 
set_name,
                                 attr_id, attr_name, attr_value);
                        
        } else if(DO_WRITE) {




------------------------------

Message: 5
Date: Mon, 10 Apr 2006 06:51:39 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : tools

Dir     : linux-ha/tools


Modified Files:
        attrd.c 


Log Message:
Dont block

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/attrd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- attrd.c     9 Apr 2006 16:54:28 -0000       1.2
+++ attrd.c     10 Apr 2006 12:51:37 -0000      1.3
@@ -1,4 +1,4 @@
-/* $Id: attrd.c,v 1.2 2006/04/09 16:54:28 andrew Exp $ */
+/* $Id: attrd.c,v 1.3 2006/04/10 12:51:37 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -102,8 +102,11 @@
 attrd_shutdown(int nsig, gpointer unused)
 {
        need_shutdown = TRUE;
+       crm_info("Exiting");
        if (mainloop != NULL && g_main_is_running(mainloop)) {
                g_main_quit(mainloop);
+       } else {
+               exit(0);
        }
        return FALSE;
 }
@@ -437,6 +440,22 @@
        return 0;
 }
 
+static void
+attrd_cib_callback(const HA_Message *msg, int call_id, int rc,
+                  crm_data_t *output, void *user_data)
+{
+       char *attr = user_data;
+       if(rc == cib_NOTEXISTS) {
+               rc = cib_ok;
+       }
+       if(rc < cib_ok) {
+               crm_err("Update %d for %s failed: %s", call_id, attr, 
cib_error2string(rc));
+       } else {
+               crm_debug("Update %d for %s passed", call_id, attr);
+       }
+       crm_free(attr);
+}
+
 void
 attrd_ha_callback(HA_Message * msg, void* private_data)
 {
@@ -452,35 +471,27 @@
        if(hash_entry == NULL) {
                const char *set  = ha_msg_value(msg, F_ATTRD_SET);
                const char *section = ha_msg_value(msg, F_ATTRD_SECTION);
-               crm_info("Send unknown delete %s %s %s", attr, set, section);
-               
-               rc = delete_attr(cib_conn, section, attrd_uuid, set,
+               rc = delete_attr(cib_conn, cib_none, section, attrd_uuid, set,
                                 NULL, attr, NULL);
-               if(rc == cib_NOTEXISTS) {
-                       rc = cib_ok;
-               }
+               crm_info("Sent delete %d: %s %s %s",
+                        rc, attr, set, section);
 
        } else if(hash_entry->value == NULL) {
                /* delete the attr */
-               crm_info("Send delete %s %s %s",
-                        attr, hash_entry->set, hash_entry->section);
-               rc = delete_attr(cib_conn, hash_entry->section, attrd_uuid,
+               rc = delete_attr(cib_conn, cib_none, hash_entry->section, 
attrd_uuid,
                                 hash_entry->set, NULL, attr, NULL);
-               if(rc == cib_NOTEXISTS) {
-                       rc = cib_ok;
-               }
+               crm_info("Sent delete %d: %s %s %s",
+                        rc, attr, hash_entry->set, hash_entry->section);
                
        } else {
                /* send update */
-               crm_info("Send update %s=%s", hash_entry->id,hash_entry->value);
-               rc = update_attr(cib_conn, cib_sync_call, hash_entry->section,
+               rc = update_attr(cib_conn, cib_none, hash_entry->section,
                                 attrd_uuid, hash_entry->set, NULL,
                                 hash_entry->id, hash_entry->value);
+               crm_info("Sent update %d: %s=%s", rc, 
hash_entry->id,hash_entry->value);
        }
-       
-       if(rc < cib_ok) {
-               crm_err("Update for %s failed: %s", attr, cib_error2string(rc));
-       }
+
+       add_cib_op_callback(rc, FALSE, crm_strdup(attr), attrd_cib_callback);
        
        return;
 }




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 29, Issue 65
********************************************

Reply via email to