[Pacemaker] [PATCH] crm shell (configure node) for Heartbeat stack
Lars Ellenberg
lars.ellenberg at linbit.com
Fri May 27 10:32:34 UTC 2011
On Fri, May 27, 2011 at 05:45:51PM +0900, Kazunori INOUE wrote:
> Hi Dejan,
>
> Thanks for the advice.
> Is your advice to be done as follows?
>
> # diff cibconfig.py.ORG cibconfig.py -urN
> --- cibconfig.py.ORG 2011-04-28 12:23:55.000000000 +0900
> +++ cibconfig.py 2011-05-27 12:00:27.427168202 +0900
> @@ -1514,6 +1514,16 @@
> def import_cib(self):
> 'Parse the current CIB (from cibadmin -Q).'
> self.doc,cib = read_cib(cibdump2doc)
> + common_debug("import_cib >BEFORE:\n%s"%(get_conf_elem(self.doc,"nodes").toprettyxml(indent=' ',newl='')))
> + nodes = get_conf_elem(self.doc,"nodes")
> + if nodes:
> + for c in nodes.childNodes:
> + if not is_element(c) or c.tagName != "node":
> + continue
> + uname = c.getAttribute("uname").encode('ascii')
> + if uname:
> + c.setAttribute("id",uname)
> + common_debug("import_cib >AFTER:\n%s"%(get_conf_elem(self.doc,"nodes").toprettyxml(indent=' ',newl='')))
> if not self.doc:
> return False
> if not cib:
> #
> # crm -d configure load update test1.cli
> DEBUG: import_cib >BEFORE:
> <nodes>
> <node id="68057c1e-6a5e-402b-be84-c56b98d5c985" type="normal" uname="srv-a2"/>
> <node id="0cd9d2df-13fa-4b11-93d3-27a57192caeb" type="normal" uname="srv-a1"/>
> </nodes>
> DEBUG: import_cib >AFTER:
> <nodes>
> <node id="srv-a2" type="normal" uname="srv-a2"/>
> <node id="srv-a1" type="normal" uname="srv-a1"/>
> </nodes>
> DEBUG: obj srv-a2 node: <node id="srv-a2" type="normal" uname="srv-a2"/>
>
> DEBUG: obj srv-a1 node: <node id="srv-a1" type="normal" uname="srv-a1"/>
>
> (snip)
> #
>
> This is it, srv-a1 and srv-a2 are added as unclean node.
>
> # crm configure show
> node srv-a2
> node srv-a1 \
> utilization capacity="1"
> node $id="68057c1e-6a5e-402b-be84-c56b98d5c985" srv-a2
> node $id="0cd9d2df-13fa-4b11-93d3-27a57192caeb" srv-a1
> property $id="cib-bootstrap-options" \
> dc-version="1.1.5-1.25.el6-5bdfc629f35af0305bb87676297d81251f0511ea" \
> cluster-infrastructure="Heartbeat"
Oh no.
Now you have duplicated all nodes, and will always get "unclean" nodes.
Is this some variant of:
http://www.clusterlabs.org/wiki/Initial_Configuration#A_Special_Note_for_People_Switching_Cluster_Stacks
Could that be the root cause of your duplicate node instances with
different ids?
Or is only the crm shell getting it wrong when updating node attributes?
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the Pacemaker
mailing list