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: cts by andrew from
([email protected])
2. Linux-HA CVS: resources by lars from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Thu, 19 Jan 2006 13:41:53 -0700 (MST)
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:
CM_LinuxHAv2.py.in
Log Message:
Turn off the usage of short resource names - it causes the audits to fail
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CM_LinuxHAv2.py.in,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -3 -r1.128 -r1.129
--- CM_LinuxHAv2.py.in 16 Jan 2006 10:17:44 -0000 1.128
+++ CM_LinuxHAv2.py.in 19 Jan 2006 20:41:53 -0000 1.129
@@ -50,6 +50,7 @@
HeartbeatCM.__init__(self, Environment, randseed=randseed)
self.cluster_monitor = 0
+ self.use_short_names = 0
self.update({
"Name" : "linux-ha-v2",
"DeadTime" : 300,
@@ -120,13 +121,14 @@
<crm_config>'''
cib_options="""
<nvpair id="c-pref-1" name="transition_idle_timeout" value="3m"/>
- <nvpair id="c-pref-2" name="symetric_cluster" value="true"/>
- <nvpair id="c-pref-3" name="short_resource_names" value="true"/>
+ <nvpair id="c-pref-2" name="symmetric_cluster" value="true"/>
+ <nvpair id="c-pref-3" name="short_resource_names" value="%d"/>
<nvpair id="c-pref-4" name="stop_orphan_resources" value="false"/>
<nvpair id="c-pref-5" name="stop_orphan_actions" value="false"/>
<nvpair id="c-pref-6" name="remove_after_stop" value="false"/>
<nvpair id="c-pref-7" name="is_managed_default" value="true"/>
- <nvpair id="c-pref-8" name="no_quorum_policy" value="stop"/>"""
+ <nvpair id="c-pref-8" name="no_quorum_policy" value="stop"/>
+ <nvpair id="c-pref-9" name="default_resource_stickiness"
value="0"/>""" % self.use_short_names
cib_glue_1='''
</crm_config>
<nodes/>
@@ -481,7 +483,10 @@
for grp in groups:
for rsc in rscs:
if rsc in grp.childNodes:
- resource = HAResource(self,rsc,grp.getAttribute('id'))
+ if self.use_short_names:
+ resource = HAResource(self,rsc,None)
+ else:
+ resource = HAResource(self,rsc,grp.getAttribute('id'))
ResourceList.append(resource)
for inc in incs:
@@ -499,7 +504,10 @@
rsc.inc_no = i
rsc.inc_name = inc_name
rsc.inc_max = max
- rsc.rid = inc_name+":"+rsc.rid + ":%d"%i
+ if self.use_short_names:
+ rsc.rid = rsc.rid + ":%d"%i
+ else:
+ rsc.rid = inc_name+":"+rsc.rid + ":%d"%i
rsc.Instance = rsc.rid
ResourceList.append(rsc)
return ResourceList
------------------------------
Message: 2
Date: Thu, 19 Jan 2006 16:17:27 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by lars from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : lars
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/heartbeat
Modified Files:
hto-mapfuncs.in
Log Message:
Fix bug #1041: heartbeat scripts need to print their status to stdout,
not stderr.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/heartbeat/hto-mapfuncs.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- hto-mapfuncs.in 17 Jan 2006 07:02:54 -0000 1.14
+++ hto-mapfuncs.in 19 Jan 2006 23:17:26 -0000 1.15
@@ -13,6 +13,11 @@
[EMAIL PROTECTED]@
+log_and_print(){
+ ha_log "$*"
+ echo "$*"
+}
+
#
# rsc_id=rsc1 rsc_type=IPaddr2 provide=heartbeat start ip=192.168.0.1 .....
#
@@ -25,7 +30,7 @@
if [ ! -x $RAOCFPATH ]
then
- ha_log "ERR $RAOCFPATH is not an executable file "
+ log_and_print "ERR $RAOCFPATH is not an executable file "
exit 1
fi
@@ -38,7 +43,7 @@
status) $RAOCFPATH status;;
usage|help) usage;;
- *) ha_log "ERROR: Mismatching operation : $OPERATION"
+ *) log_and_print "ERROR: Unknown operation: $OPERATION"
usage
exit 1;;
esac
@@ -47,36 +52,36 @@
case $ocf_return_status in
$OCF_SUCCESS)
case $OPERATION in
- monitor|status) ha_log "INFO: $rsc_type Running OK";;
- *) ha_log "INFO: $rsc_type Success";;
+ monitor|status) log_and_print "INFO: $rsc_type Running
OK";;
+ *) log_and_print "INFO: $rsc_type
Success";;
esac
;;
$OCF_ERR_GENERIC)
- ha_log "ERROR: " $rsc_type Generic error
+ log_and_print "ERROR: " $rsc_type Generic error
;;
$OCF_ERR_ARGS)
- ha_log "ERROR: " $rsc_type Incompliant argument
+ log_and_print "ERROR: " $rsc_type Incompliant argument
;;
$OCF_ERR_UNIMPLEMENTED)
- ha_log "ERROR: " $rsc_type Function unimplemented
+ log_and_print "ERROR: " $rsc_type Function unimplemented
;;
$OCF_ERR_PERM)
- ha_log "ERROR: " $rsc_type User had insufficient privilege
+ log_and_print "ERROR: " $rsc_type User had insufficient
privilege
;;
$OCF_ERR_INSTALLED)
- ha_log "ERROR: " $rsc_type Program is not installed
+ log_and_print "ERROR: " $rsc_type Program is not installed
;;
$OCF_ERR_CONFIGURED)
- ha_log "ERROR: " $rsc_type Program is not configured
+ log_and_print "ERROR: " $rsc_type Program is not configured
;;
$OCF_NOT_RUNNING)
- ha_log "INFO: " $rsc_type Resource is stopped
+ log_and_print "INFO: " $rsc_type Resource is stopped
;;
*)
echo $?
- ha_log "ERROR: " $rsc_type Unknown error
+ log_and_print "ERROR: " $rsc_type Unknown error
exit 1
;;
esac
------------------------------
Message: 3
Date: Fri, 20 Jan 2006 02:30:37 -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/cib
Modified Files:
callbacks.c io.c
Log Message:
Read only calls dont need to be logged as prominently
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/callbacks.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- callbacks.c 17 Jan 2006 21:47:28 -0000 1.94
+++ callbacks.c 20 Jan 2006 09:30:37 -0000 1.95
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.94 2006/01/17 21:47:28 andrew Exp $ */
+/* $Id: callbacks.c,v 1.95 2006/01/20 09:30:37 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -384,8 +384,9 @@
cib_common_callback(
IPC_Channel *channel, gpointer user_data, gboolean privileged)
{
- int rc = cib_ok;
int lpc = 0;
+ int rc = cib_ok;
+ int call_type = 0;
const char *op = NULL;
HA_Message *op_request = NULL;
@@ -414,17 +415,27 @@
}
op = cl_get_string(op_request, F_CIB_OPERATION);
- crm_info("Processing %s operation from %s/%s",
- op, cib_client->name, cib_client->channel_name);
+ rc = cib_get_operation_id(op_request, &call_type);
+ if(rc != cib_ok) {
+ crm_debug("Invalid operation %s from %s/%s",
+ op, cib_client->name,
cib_client->channel_name);
+
+ } else if(cib_server_ops[call_type].modifies_cib) {
+ crm_info("Processing %s operation from %s/%s",
+ op, cib_client->name,
cib_client->channel_name);
+ } else {
+ crm_debug("Processing %s operation from %s/%s",
+ op, cib_client->name,
cib_client->channel_name);
+ }
+
crm_log_message_adv(LOG_MSG, "Client[inbound]", op_request);
lpc++;
- rc = cib_ok;
CRM_DEV_ASSERT(
ha_msg_add(op_request, F_CIB_CLIENTID, cib_client->id)
== HA_OK);
- if(crm_assert_failed == FALSE) {
+ if(rc == cib_ok && crm_assert_failed == FALSE) {
cib_process_request(
op_request, privileged, FALSE, cib_client);
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- io.c 16 Jan 2006 09:16:32 -0000 1.40
+++ io.c 20 Jan 2006 09:30:37 -0000 1.41
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.40 2006/01/16 09:16:32 andrew Exp $ */
+/* $Id: io.c,v 1.41 2006/01/20 09:30:37 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -285,7 +285,6 @@
struct stat tmp;
int s_res = stat(newname, &tmp);
-
if (s_res >= 0)
{
if (backup == TRUE) {
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 26, Issue 46
********************************************