Hi all,
Heartbeat 2.1.3, crm enabled
I've built an initial drbd master/slave on two systems, lvc7 and
lvc8, following http://www.linux-ha.org/DRBD/HowTov2. The drbd is
coming alive in P/S mode, but it will not fail over when I kill the
master; the slave stays in secondary. stonith was not working, so
I've decided to make that work in v2 (I had it working in a v1 build
about a month ago.)
I had to modify the source of the apcmaster.c plugin to make it
work; it was looking for an initial escape character that is never
displayed. FWIW I've attached the changes in patch form.
After the source mod, the command line now works:
# stonith -S -t apcmaster -p '123.456.789.123 login pass'
** INFO: Successful login to APC MasterSwitch.
stonith: apcmaster device OK.
Then, I am trying to define the stonith device in xml; the source to
the apc3.xml file is attached. I am adding from a separate command
line:
cibadmin -C -o resources -x apc3.xml
The log messages are below. The xml seems to be accepted okay, but
the following error is displayed on for both systems, lvc7 and lvc8.
Processing failed op child_lvc_stonith:0_start_0 on lvc7.fishnet.us: Error
If anyone has an idea what might be wrong I would certainly
appreciate any pointers. Thanks...
-- Michael
Feb 17 04:34:37 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <clone id="lvc_stonith">
Feb 17 04:34:37 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <instance_attributes id="ia_lvc_stonith">
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <primitive id="child_lvc_stonith" class="stonith"
type="apcmaster">
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <instance_attributes id="pia_lvc_stonith">
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <nvpair id="stonith_ip" name="ipaddr"
value="172.16.100.110"/>
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <nvpair id="stonith_user" name="login"
value="topd3sk"/>
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <nvpair id="stonith_pass" name="passwd"
value="654"/>
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <rsc_location id="lvc_stonith_loc_lvc7" rsc="lvc_stonith">
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <rule id="lvc_stonith_rule_lvc7" score="INFINITY">
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <expression id="lvc_stonith_exp_lvc7" attribute="#uname"
operation="eq" value="lvc7.fishnet.us"/>
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <rsc_location id="lvc_stonith_loc_lvc8" rsc="lvc_stonith">
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <rule id="lvc_stonith_rule_lvc8" score="INFINITY">
Feb 17 04:34:38 lvc8 cib: [24329]: info: log_data_element: cib:diff:
+ <expression id="lvc_stonith_exp_lvc8" attribute="#uname"
operation="eq" value="lvc8.fishnet.us"/>
Feb 17 04:34:38 lvc8 pengine: [30174]: WARN: unpack_rsc_op:
Processing failed op child_lvc_stonith:0_start_0 on lvc7.fishnet.us:
Error
Feb 17 04:34:38 lvc8 pengine: [30174]: WARN: unpack_rsc_op:
Compatability handling for failed op child_lvc_stonith:0_start_0 on
lvc7.fishnet.us
Feb 17 04:34:38 lvc8 pengine: [30174]: WARN: unpack_rsc_op:
Processing failed op child_lvc_stonith:1_start_0 on lvc7.fishnet.us:
Error
Feb 17 04:34:38 lvc8 pengine: [30174]: WARN: unpack_rsc_op:
Compatability handling for failed op child_lvc_stonith:1_start_0 on
lvc7.fishnet.us
<?xml version="1.0" ?>
<cib>
<configuration>
<resources>
<clone id="lvc_stonith">
<instance_attributes id="ia_lvc_stonith">
<attributes>
<nvpair name="clone_max" value="2" id="nv_lvc_stonith_max"/>
<nvpair name="clone_node_max" value="1" id="nv_lvc_stonith_nmax"/>
</attributes>
</instance_attributes>
<primitive id="child_lvc_stonith" class="stonith" type="apcmaster">
<operations>
<op name="monitor" interval="15s" timeout="30s" prereq="nothing"
id="op_lvc_stonith_mon"/>
<op name="start" timeout="31s" prereq="nothing"
id="op_lvc_stonith_start"/>
</operations>
<instance_attributes id="pia_lvc_stonith">
<attributes>
<nvpair id="stonith_ip" name="ipaddr" value="123.456.789.123"/>
<nvpair id="stonith_user" name="login" value="login"/>
<nvpair id="stonith_pass" name="passwd" value="passwd"/>
</attributes>
</instance_attributes>
</primitive>
</clone>
</resources>
<constraints>
<rsc_location id="lvc_stonith_loc_lvc7" rsc="lvc_stonith">
<rule id="lvc_stonith_rule_lvc7" score="INFINITY">
<expression id="lvc_stonith_exp_lvc7" attribute="#uname" operation="eq"
value="lvc7.fishnet.us"/>
</rule>
</rsc_location>
<rsc_location id="lvc_stonith_loc_lvc8" rsc="lvc_stonith">
<rule id="lvc_stonith_rule_lvc8" score="INFINITY">
<expression id="lvc_stonith_exp_lvc8" attribute="#uname" operation="eq"
value="lvc8.fishnet.us"/>
</rule>
</rsc_location>
</constraints>
</configuration>
</cib>
--- /usr/src/heartbeat-2.1.3/lib/plugins/stonith/apcmaster.c 2007-12-21
09:32:27.000000000 -0600
+++ /usr/src/heartbeat-2.1.3/lib/plugins/stonith/apcmaster_nmb.c
2008-02-17 05:23:26.000000000 -0600
@@ -147,8 +147,13 @@
#define APCMSSTR "American Power Conversion"
-static struct Etoken EscapeChar[] = { {"Escape character is '^]'.", 0, 0}
- , {NULL,0,0}};
+/* nmb
+static struct Etoken EscapeChar[] = {
+ {"Escape character is '^]'.", 0, 0},
+ {"User Name :", 0, 0},
+ {NULL,0,0}
+};
+ */
static struct Etoken login[] = { {"User Name :", 0, 0},
{NULL,0,0}};
static struct Etoken password[] = { {"Password :", 0, 0} ,{NULL,0,0}};
static struct Etoken Prompt[] = { {"> ", 0, 0} ,{NULL,0,0}};
@@ -187,7 +192,7 @@
static int
MSLogin(struct pluginDevice * ms)
{
- EXPECT(ms->rdfd, EscapeChar, 10);
+ // nmb EXPECT(ms->rdfd, EscapeChar, 10);
/*
* We should be looking at something like this:
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems