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: tools by zhenh from
([email protected])
2. Linux-HA CVS: heartbeat by andrew from
([email protected])
3. Linux-HA CVS: include by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 16 Jan 2006 02:11:06 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : tools
Dir : linux-ha/tools
Modified Files:
haresources2cib.py.in
Log Message:
convert more heartbeat RAs to OCF RAs
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/haresources2cib.py.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- haresources2cib.py.in 7 Jan 2006 22:25:12 -0000 1.3
+++ haresources2cib.py.in 16 Jan 2006 09:11:05 -0000 1.4
@@ -31,10 +31,24 @@
using_mon = 1
ocf_ra_setting = {
- "apache" :{"params":["configfile"],"time":["120s","60s"]},
- "IPaddr"
:{"params":["ip","netmask","nic","broadcast"],"time":["5s","5s"]},
-
"IPaddr2":{"params":["ip","netmask","nic","broadcast"],"time":["5s","5s"]},
- "db2" :{"params":["instance"],"time":["120s","60s"]}
+ "apache" :{"params":["configfile"],"time":["120s","60s"]},
+ "IPaddr"
:{"params":["ip","netmask","nic","broadcast"],"time":["5s","5s"]},
+ "IPaddr2"
:{"params":["ip","netmask","nic","broadcast"],"time":["5s","5s"]},
+ "db2" :{"params":["instance"],"time":["120s","60s"]},
+ "AudibleAlarm":{"params":["nodelist"],"time":["120s","60s"]},
+ "Delay" :{"params":["delay","stopdelay"],"time":["120s","60s"]},
+
"Filesystem":{"params":["device","directory","fstype","options"],"time":["120s","60s"]},
+ "ICP" :{"params":["driveid","device"],"time":["120s","60s"]},
+ "IPsrcaddr" :{"params":["ipaddress"],"time":["5s","5s"]},
+ "IPv6addr" :{"params":["ipv6addr"],"time":["5s","5s"]},
+ "LinuxSCSI" :{"params":["scsi"],"time":["120s","60s"]},
+ "LVM" :{"params":["volgrpname"],"time":["120s","60s"]},
+ "MailTo" :{"params":["email","subject"],"time":["120s","60s"]},
+ "portblock"
:{"params":["protocol","portno","action"],"time":["120s","60s"]},
+ "Raid1" :{"params":["raidconf","raiddev"],"time":["120s","60s"]},
+ "ServeRAID"
:{"params":["serveraid","mergegroup"],"time":["120s","60s"]},
+ "WinPopup" :{"params":["hostfile"],"time":["120s","60s"]},
+ "Xinetd" :{"params":["service"],"time":["120s","60s"]}
}
config_defaults = [
@@ -170,18 +184,20 @@
except ValueError:
#nic
params[2] = param
- index = 0
- for param in params:
- if param == None :
- index += 1
+ for i in range(0,len(params)) :
+ if params[i] == None :
continue
nvpair = doc.createElement("nvpair")
- name = ocf_ra_setting[type]["params"][index]
- nvpair.setAttribute("id",id + "_attr_" +
str(index))
+ name = ocf_ra_setting[type]["params"][i]
+ nvpair.setAttribute("id",id + "_attr_" + str(i))
nvpair.setAttribute("name",name)
- nvpair.setAttribute("value",str(param))
- attributes.appendChild(nvpair)
- index += 1
+ if i == len(ocf_ra_setting[type]["params"]) - 1
:
+
nvpair.setAttribute("value",string.join(params[i:]))
+ attributes.appendChild(nvpair)
+ break
+ else :
+
nvpair.setAttribute("value",str(params[i]))
+ attributes.appendChild(nvpair)
else :
index = 1
for param in params :
------------------------------
Message: 2
Date: Mon, 16 Jan 2006 02:16:32 -0700 (MST)
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:
Three new ha.cf options:
- record_config_changes (on/off)
on: the current implementation logs config changes at the value of "debug"
off: the current implementation logs config changes at the value of "debug" + 1
- record_pengine_inputs (on/off)
on: the current implementation logs config changes at the value of "debug"
off: the current implementation logs config changes at the value of "debug" + 1
- enable_config_writes (on/off)
on: write (CIB) config changes to disk
off: do NOT write (CIB) config changes to disk
Remove the old enable_config_writes option from the CIB, it was broken and
required linking against the pengine library to fix as correct interpretation
required understanding the CIB's contents.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/config.c,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -3 -r1.190 -r1.191
--- config.c 21 Dec 2005 00:01:51 -0000 1.190
+++ config.c 16 Jan 2006 09:16:32 -0000 1.191
@@ -1,4 +1,4 @@
-/* $Id: config.c,v 1.190 2005/12/21 00:01:51 gshi Exp $ */
+/* $Id: config.c,v 1.191 2006/01/16 09:16:32 andrew Exp $ */
/*
* Parse various heartbeat configuration files...
*
@@ -106,6 +106,7 @@
static int set_release2mode(const char*);
static int set_autojoin(const char*);
static int set_uuidfrom(const char*);
+static int ha_config_check_boolean(const char *);
#ifdef ALLOWPOLLCHOICE
static int set_normalpoll(const char *);
#endif
@@ -163,8 +164,12 @@
,{KEY_TRADITIONAL_COMPRESSION, set_traditional_compression, TRUE, "yes", "set
traditional_compression"}
,{KEY_ENV, set_env, FALSE, NULL, "set environment variable"}
,{KEY_MAX_REXMIT_DELAY, set_max_rexmit_delay, TRUE,"250", "set the maximum
rexmit delay time"}
+,{KEY_LOG_CONFIG_CHANGES, ha_config_check_boolean, TRUE,"on", "record changes
to the cib (valid only with: "KEY_REL2" on)"}
+,{KEY_LOG_PENGINE_INPUTS, ha_config_check_boolean, TRUE,"on", "record the
input used by the policy engine (valid only with: "KEY_REL2" on)"}
+,{KEY_CONFIG_WRITES_ENABLED, ha_config_check_boolean, TRUE,"on", "write
configuration changes to disk (valid only with: "KEY_REL2" on)"}
};
+
static const struct WholeLineDirective {
const char * type;
int (*parse) (const char *line);
@@ -2477,8 +2482,44 @@
return HA_FAIL;
}
+static int
+ha_config_check_boolean(const char *value)
+{
+ int result;
+
+ if (value == NULL){
+ cl_log(LOG_ERR, "%s: NULL pointer",
+ __FUNCTION__);
+ return HA_FAIL;
+ }
+
+ if (cl_str_to_boolean(value, &result)!= HA_OK){
+ cl_log(LOG_ERR, "%s:Invalid directive value %s",
+ __FUNCTION__,value);
+ return HA_FAIL;
+ }
+
+ return HA_OK;
+}
+
/*
* $Log: config.c,v $
+ * Revision 1.191 2006/01/16 09:16:32 andrew
+ * Three new ha.cf options:
+ * - record_config_changes (on/off)
+ * on: the current implementation logs config changes at the value of "debug"
+ * off: the current implementation logs config changes at the value of
"debug" + 1
+ * - record_pengine_inputs (on/off)
+ * on: the current implementation logs config changes at the value of "debug"
+ * off: the current implementation logs config changes at the value of
"debug" + 1
+ * - enable_config_writes (on/off)
+ * on: write (CIB) config changes to disk
+ * off: do NOT write (CIB) config changes to disk
+ *
+ * Remove the old enable_config_writes option from the CIB, it was broken and
+ * required linking against the pengine library to fix as correct
interpretation
+ * required understanding the CIB's contents.
+ *
* Revision 1.190 2005/12/21 00:01:51 gshi
* make max rexmit delay tunable in ha.cf
*
------------------------------
Message: 3
Date: Mon, 16 Jan 2006 02:16:32 -0700 (MST)
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
Modified Files:
hb_api.h
Log Message:
Three new ha.cf options:
- record_config_changes (on/off)
on: the current implementation logs config changes at the value of "debug"
off: the current implementation logs config changes at the value of "debug" + 1
- record_pengine_inputs (on/off)
on: the current implementation logs config changes at the value of "debug"
off: the current implementation logs config changes at the value of "debug" + 1
- enable_config_writes (on/off)
on: write (CIB) config changes to disk
off: do NOT write (CIB) config changes to disk
Remove the old enable_config_writes option from the CIB, it was broken and
required linking against the pengine library to fix as correct interpretation
required understanding the CIB's contents.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/hb_api.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- hb_api.h 21 Dec 2005 02:34:32 -0000 1.42
+++ hb_api.h 16 Jan 2006 09:16:32 -0000 1.43
@@ -1,4 +1,4 @@
-/* $Id: hb_api.h,v 1.42 2005/12/21 02:34:32 gshi Exp $ */
+/* $Id: hb_api.h,v 1.43 2006/01/16 09:16:32 andrew Exp $ */
/*
* Client-side Low-level clustering API for heartbeat.
*
@@ -430,6 +430,9 @@
#define KEY_UUIDFROM "uuidfrom"
#define KEY_ENV "env"
#define KEY_MAX_REXMIT_DELAY "max_rexmit_delay"
+#define KEY_LOG_CONFIG_CHANGES "record_config_changes"
+#define KEY_LOG_PENGINE_INPUTS "record_pengine_inputs"
+#define KEY_CONFIG_WRITES_ENABLED "enable_config_writes"
ll_cluster_t* ll_cluster_new(const char * llctype);
#endif /* __HB_API_H */
------------------------------
_______________________________________________
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 34
********************************************