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: include by andrew from 
      ([email protected])
   2. Linux-HA CVS: lib by andrew from 
      ([email protected])
   3. Linux-HA CVS: crm by andrew from 
      ([email protected])
   4. Linux-HA CVS: cts by andrew from 
      ([email protected])


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

Message: 1
Date: Tue, 18 Apr 2006 05:23:45 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/include/crm/common


Modified Files:
        util.h 


Log Message:
Might come in handy

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/common/util.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- util.h      10 Apr 2006 16:18:25 -0000      1.33
+++ util.h      18 Apr 2006 11:23:45 -0000      1.34
@@ -1,4 +1,4 @@
-/* $Id: util.h,v 1.33 2006/04/10 16:18:25 andrew Exp $ */
+/* $Id: util.h,v 1.34 2006/04/18 11:23:45 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -84,6 +84,9 @@
 extern char *generate_op_key(
        const char *rsc_id, const char *op_type, int interval);
 
+extern gboolean parse_op_key(
+       const char *key, char **rsc_id, char **op_type, int *interval);
+
 extern char *generate_notify_key(
        const char *rsc_id, const char *notify_type, const char *op_type);
 




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

Message: 2
Date: Tue, 18 Apr 2006 05:28:56 -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/cib


Modified Files:
        cib_attrs.c 


Log Message:
Compiling on other platforms

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/cib/cib_attrs.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- cib_attrs.c 10 Apr 2006 13:05:55 -0000      1.23
+++ cib_attrs.c 18 Apr 2006 11:28:56 -0000      1.24
@@ -1,4 +1,4 @@
-/* $Id: cib_attrs.c,v 1.23 2006/04/10 13:05:55 andrew Exp $ */
+/* $Id: cib_attrs.c,v 1.24 2006/04/18 11:28:56 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -183,10 +183,10 @@
        crm_data_t *xml_next = NULL;
        crm_data_t *fragment = NULL;
 
+       attr_common_setup(section);
+
        CRM_ASSERT(attr_value != NULL);
        *attr_value = NULL;
-
-       attr_common_setup(section);
        
        crm_debug("Searching for attribute %s (section=%s, node=%s, set=%s)",
                  attr_name, section, crm_str(node_uuid), crm_str(set_name));




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

Message: 3
Date: Tue, 18 Apr 2006 06:19:17 -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/crmd


Modified Files:
        atest.c 


Log Message:
Compiling on other platforms

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/atest.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- atest.c     3 Apr 2006 10:03:06 -0000       1.8
+++ atest.c     18 Apr 2006 12:19:17 -0000      1.9
@@ -1,4 +1,4 @@
-/* $Id: atest.c,v 1.8 2006/04/03 10:03:06 andrew Exp $ */
+/* $Id: atest.c,v 1.9 2006/04/18 12:19:17 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -67,137 +67,6 @@
 int
 main(int argc, char ** argv)
 {
-#if 0
-
-       int start = 0, length = 0, read_len = 0;
-       char *buffer = NULL;
-       int rc = 0;
-       FILE *file_strm = NULL;
-       const char *my_msg = "my first message";
-       char *compressed = NULL;
-       size_t compressed_len = 100;
-
-       char *decomp = NULL;
-       size_t decomp_len = 1;
-       size_t alloced_decomp_len = decomp_len;
-       
-       cl_log_enable_stderr(1);
-
-       crm_malloc0(compressed, 100);
-       
-       cl_compress(compressed, &compressed_len, my_msg, strlen(my_msg));
-       crm_err("Original: len: %zd, str: %s",
-               strlen(my_msg), my_msg);
-       
-       crm_err("Compressed: len: %zd, str: %s",
-               compressed_len, compressed);
-
-       file_strm = fopen("foo.bz2", "w");
-       rc = fprintf(file_strm, "%s", compressed);
-       if(rc < 0) {
-               cl_perror("Cannot write output to foo.bz2");
-       }
-       fflush(file_strm);
-       fclose(file_strm);
-       
-       file_strm = fopen("foo.bz2", "r");
-       start  = ftell(file_strm);
-       fseek(file_strm, 0L, SEEK_END);
-       length = ftell(file_strm);
-       fseek(file_strm, 0L, start);
-       
-       CRM_ASSERT(start == ftell(file_strm));
-
-       crm_err("Reading %d bytes from file", length);
-       crm_malloc0(buffer, sizeof(char) * (length+1));
-       read_len = fread(buffer, sizeof(char), length, file_strm);
-       if(read_len != length) {
-               crm_err("Calculated and read bytes differ: %d vs. %d",
-                       length, read_len);
-               crm_free(buffer);
-               buffer = NULL;
-               
-       } else  if(length <= 0) {
-               crm_info("foo.bz2 was not valid");
-               crm_free(buffer);
-               buffer = NULL;
-       }
-
-       while(alloced_decomp_len <= decomp_len) {
-               crm_err("Trying with buffer size: %zd", alloced_decomp_len);
-               if(decomp != NULL) {
-                       crm_err("Found: %s", decomp);
-                       crm_free(decomp);
-               }
-
-               decomp_len = 2*decomp_len;
-               crm_malloc0(decomp, (decomp_len+1)*sizeof(char));
-               alloced_decomp_len = decomp_len;
-               
-               cl_decompress(decomp, &decomp_len, buffer, length);
-/*             cl_decompress(decomp, &decomp_len, compressed, compressed_len); 
*/
-       }
-       
-       crm_err("Decompressed: len: %zd, str: %s", decomp_len, decomp);
-       
-       return 0;
-#else
-       int rc = 0;
-       FILE *file_strm = NULL;
-       BZFILE *my_file = NULL;
-       char *my_msg = strdup("my first message");
-       unsigned int in = 0, out = 0;
-       char *decomp = NULL;
-       size_t decomp_len = 1;
-       size_t alloced_decomp_len = decomp_len;
-       
-       cl_log_enable_stderr(1);
-       file_strm = fopen("foo.bz2", "w");
-       my_file = BZ2_bzWriteOpen(&rc, file_strm, 1, 0, 0);
-       if(rc != BZ_OK) {
-               crm_err("Failed: open (%d)", rc);
-               return 0;
-       }
-       BZ2_bzWrite(&rc, my_file, my_msg, strlen(my_msg));
-       if(rc != BZ_OK) {
-               crm_err("Failed: write (%d)", rc);
-               return 0;
-       }
-       BZ2_bzWriteClose(&rc, my_file, 0, &in, &out);
-       crm_err("In: %d, out: %d", in, out);
-       fclose(file_strm);
-       my_file = NULL;
-       file_strm = NULL;
-       
-       while(alloced_decomp_len <= decomp_len) {
-               crm_err("Trying with buffer size: %zd", alloced_decomp_len);
-               if(decomp != NULL) {
-                       crm_err("Found: %s", decomp);
-                       crm_free(decomp);
-               }
-               if(my_file != NULL) {
-                       crm_err("Closing...");
-                       BZ2_bzReadClose(&rc, my_file);
-                       fclose(file_strm);
-               }
-               file_strm = fopen("foo.bz2", "r");
-               my_file = BZ2_bzReadOpen(&rc, file_strm, 0, 0, NULL, 0);
-               if(rc != BZ_OK) {
-                       crm_err("Failed: read open (%d)", rc);
-               }
-
-               decomp_len = 2*decomp_len;
-               crm_malloc0(decomp, (decomp_len+1)*sizeof(char));
-               alloced_decomp_len = decomp_len;
-               
-               decomp_len = BZ2_bzRead(&rc, my_file, decomp, decomp_len);
-               if(rc != BZ_OK) {
-                       crm_err("Failed: read (%d)", rc);
-               }
-       }
-       
-       crm_err("Decompressed: len: %zd, str: %s", decomp_len, decomp);
        return 0;
-#endif
 }
 




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

Message: 4
Date: Tue, 18 Apr 2006 10:07:22 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/cts


Modified Files:
        CTStests.py.in 


Log Message:
Dont cross quorum boundaries when running stonithd tests

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTStests.py.in,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- CTStests.py.in      13 Apr 2006 06:51:52 -0000      1.141
+++ CTStests.py.in      18 Apr 2006 16:07:22 -0000      1.142
@@ -610,6 +610,7 @@
     def __init__(self, cm, timeout=600):
         StonithTest.__init__(self, cm, timeout=600)
         self.name="Stonithd"
+        self.startall = SimulStartLite(cm)
         self.start = StartTest(cm)
         self.stop = StopTest(cm)
         self.init_node = None
@@ -638,15 +639,8 @@
         while self.init_node == target_node:
             self.init_node = self.CM.Env.RandomNode()
 
-        if self.CM.ShouldBeStatus[target_node] == self.CM["down"]:
-            if not self.start(target_node):
-                self.CM.log("Node %s (target) failed to start"%target_node)
-                return None
-
-        if self.CM.ShouldBeStatus[self.init_node] == self.CM["down"]:
-            if not self.start(self.init_node):
-                self.CM.log("Node %s (init) failed to start"%self.init_node)
-                return None
+        if not self.startall(None):
+            return self.failure("Test setup failed")
 
         return 1
         




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

_______________________________________________
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 93
********************************************

Reply via email to