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: crm by andrew from
([email protected])
2. Linux-HA CVS: cim by panjiam from
([email protected])
3. Linux-HA CVS: cim by panjiam from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 21 Mar 2006 13:40:14 -0700 (MST)
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/pengine
Modified Files:
unpack.c
Log Message:
If a probe detects the resource is running we shouldn't mark the resource
as running and not process it as being failed - even though the action
technically failed because we expected it to not be running.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -3 -r1.166 -r1.167
--- unpack.c 18 Mar 2006 17:23:48 -0000 1.166
+++ unpack.c 21 Mar 2006 20:40:14 -0000 1.167
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.166 2006/03/18 17:23:48 andrew Exp $ */
+/* $Id: unpack.c,v 1.167 2006/03/21 20:40:14 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -1358,6 +1358,14 @@
} else if(EXECRA_FAILED_MASTER == actual_rc_i) {
rsc->role = RSC_ROLE_MASTER;
task_status_i = LRM_OP_ERROR;
+
+ } else if(EXECRA_OK == actual_rc_i
+ && interval == 0
+ && safe_str_eq(task, CRMD_ACTION_STATUS)) {
+ rsc->role = RSC_ROLE_STARTED;
+ crm_info("%s: resource %s is active on %s",
+ id, rsc->id, node->details->uname);
+ return TRUE;
}
if(task_status_i == LRM_OP_ERROR
------------------------------
Message: 2
Date: Tue, 21 Mar 2006 19:49:30 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : panjiam
Host :
Project : linux-ha
Module : cim
Dir : linux-ha/cim
Modified Files:
utils.c utils.h
Log Message:
now cim can be compiled, thanks to David
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/utils.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- utils.c 20 Mar 2006 03:21:30 -0000 1.1
+++ utils.c 22 Mar 2006 02:49:30 -0000 1.2
@@ -115,19 +115,19 @@
match = cim_realloc(match, (i+1) * sizeof(char*));
if ( match == NULL ) {
- free_2d_array(match, cim_free, i);
+ free_2d_array(match, i, cim_free);
regfree(®exp);
return NULL;
}
match[i] = cim_malloc(str_len + 1);
if ( match[i] == NULL ) {
- free_2d_array(match, cim_free, i);
+ free_2d_array(match, i, cim_free);
regfree(®exp);
return NULL;
}
- strncpy( (*match)[i], str + pm[i].rm_so, str_len);
+ strncpy( match[i], str + pm[i].rm_so, str_len);
match[i][str_len] = EOS;
}
*len = i;
@@ -136,27 +136,27 @@
}
void
-free_2d_zarray(void * a, void (*free_t)(void *))
+free_2d_zarray(void *zarray, cim_free_t free)
{
- void ** array = (void **)a;
- if (array) {
- int i = 0;
- while ( array[i++] ){
- free_t(array[i-1]);
- }
- cim_free(array);
+ void ** z = (void **)zarray;
+ int i = 0;
+ void * p;
+
+ while ((p=z[i++])) {
+ free(p);
}
+ cim_free(z);
}
void
-free_2d_array(void * a, int len, void (*free_t)(void *))
+free_2d_array(void * a, int len, cim_free_t free)
{
int i;
void ** array = (void **)a;
for (i=0; i<len; i++){
if (array[i]) {
- free_t(array[i]);
+ free(array[i]);
}
}
cim_free(array);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/utils.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- utils.h 20 Mar 2006 03:21:30 -0000 1.1
+++ utils.h 22 Mar 2006 02:49:30 -0000 1.2
@@ -215,17 +215,16 @@
})
-void dump_cim_table(CIMTable * table, const char * id);
-int cim_init_logger(const char * entity);
-void cim_assert(const char * assertion, int line, const char * file);
-int run_shell_cmnd(const char * cmnd,
- int * ret, char *** out, char *** err);
-char * regex_search(const char * reg, const char * str, int *
len);
-void free_2d_zarray(void * array, cim_free_t free);
-void free_2d_array(void * array, int len, cim_free_t free);
-
+void dump_cim_table(CIMTable *table, const char *id);
+int cim_init_logger(const char* entity);
+void cim_assert(const char* assertion, int line, const char* file);
+int run_shell_cmnd(const char* cmnd,
+ int* ret, char*** out, char*** err);
+char ** regex_search(const char * reg, const char * str, int *
len);
+void free_2d_array(void *array, int len, cim_free_t free);
+void free_2d_zarray(void *zarray, cim_free_t free);
char * uuid_to_str(const cl_uuid_t * uuid);
-char ** split_string(const char * string, int * len, const char
* delim);
+char ** split_string(const char *string, int *len, const char
*delim);
------------------------------
Message: 3
Date: Wed, 22 Mar 2006 01:51:48 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : panjiam
Host :
Project : linux-ha
Module : cim
Dir : linux-ha/cim
Modified Files:
software_identity_provider.c
Log Message:
use split_string instead of regexp search
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/software_identity_provider.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- software_identity_provider.c 20 Mar 2006 03:35:28 -0000 1.2
+++ software_identity_provider.c 22 Mar 2006 08:51:47 -0000 1.3
@@ -157,19 +157,20 @@
/* get config table */
if ( ( info = cim_get_software_identity () ) == NULL ) {
+ cl_log(LOG_ERR, "can't get software_identity");
CMReturn(CMPI_RC_ERR_FAILED);
}
/* search KEY_HBVERSION in keys */
- hbversion = (char *)cim_table_lookup(info, "hbversion");
-
+ hbversion = (char *)cim_table_lookup_v(info, "hbversion").v.str;
+
/* set properties */
CMSetProperty(ci, "InstanceID", instance_id, CMPI_chars);
CMSetProperty(ci, "VersionString", hbversion, CMPI_chars);
CMSetProperty(ci, "Caption", caption, CMPI_chars);
/* convert char * to int */
- match = regex_search("(.*)\\.(.*)\\.(.*)", hbversion, &len);
+ match = split_string(hbversion, &len, ".");
if ( match && len == 3 ){
int major = 0, minor = 0, revision = 0;
if ( match[0] )
@@ -185,12 +186,11 @@
CMSetProperty(ci, "MajorVersion", &major, CMPI_uint16);
CMSetProperty(ci, "MinorVersion", &minor, CMPI_uint16);
CMSetProperty(ci, "RevisionNumber", &revision, CMPI_uint16);
+ free_2d_array(match, len, cim_free);
}
CMReturnInstance(rslt, ci);
CMReturnDone(rslt);
-
- free_2d_zarray(match, cim_free);
cim_table_free(info);
DEBUG_LEAVE();
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 28, Issue 54
********************************************