[Pacemaker] clone

Michael Schwartzkopff misch at clusterbau.com
Wed Oct 6 05:25:09 EDT 2010


On Wednesday 06 October 2010 11:19:05 Cédric Castanet wrote:
> Hi everybody,
> I'm discovering pacemaker and cluster. I've Succed to build a
> avtive/passive cluster with apache and a custom app. I want to switch to
> active/active. so i guess i need to clone the resource. I had a probleme
> with de crm configure clone. I'm not able to find a way to solve it. Can
> you help me ?
> 
> root at node2:~# crm configure primitive SecIP ocf:heartbeat:IPaddr2 params
> ip="192.168.2.20" cidr_netmask="24" clusterip_hash="sourceip" op monitor
> interval="30s"
> 
> root at node2:~# ping 192.168.2.20
> PING 192.168.2.20 (192.168.2.20) 56(84) bytes of data.
> 64 bytes from 192.168.2.20: icmp_seq=1 ttl=64 time=0.038 ms
> 64 bytes from 192.168.2.20: icmp_seq=2 ttl=64 time=0.037 ms
> 64 bytes from 192.168.2.20: icmp_seq=3 ttl=64 time=0.030 ms
> 
> root at node2:~# crm configure clone CloneSecIP SecIP params
> resource-stickiness="0" meta globally-unique=”true” clone-max=”2”
> clone-node-max="2"
> Traceback (most recent call last):
> File "/usr/sbin/crm", line 41, in <module>
> crm.main.run()
> File "/usr/lib/python2.6/dist-packages/crm/main.py", line 246, in run
> if parse_line(levels,shlex.split(' '.join(args))):
> File "/usr/lib/python2.6/dist-packages/crm/main.py", line 144, in
> parse_line rv = d() # execute the command
> File "/usr/lib/python2.6/dist-packages/crm/main.py", line 143, in <lambda>
> d = lambda: cmd[0](*args)
> File "/usr/lib/python2.6/dist-packages/crm/ui.py", line 1436, in conf_clone
> return self.__conf_object(cmd,*args)
> File "/usr/lib/python2.6/dist-packages/crm/ui.py", line 1415, in
> __conf_object
> return f()
> File "/usr/lib/python2.6/dist-packages/crm/ui.py", line 1414, in <lambda>
> f = lambda: cib_factory.create_object(cmd,*args)
> File "/usr/lib/python2.6/dist-packages/crm/cibconfig.py", line 1954, in
> create_object
> return self.create_from_cli(CliParser().parse(list(args))) != None
> File "/usr/lib/python2.6/dist-packages/crm/cibconfig.py", line 2019, in
> create_from_cli
> return self.add_element(obj, node)
> File "/usr/lib/python2.6/dist-packages/crm/cibconfig.py", line 2153, in
> add_element
> if not obj.cli_use_validate():
> File "/usr/lib/python2.6/dist-packages/crm/cibconfig.py", line 802, in
> cli_use_validate
> cli_text = self.repr_cli(format = -1)
> File "/usr/lib/python2.6/dist-packages/crm/cibconfig.py", line 694, in
> repr_cli
> return self.cli_format(l,format)
> File "/usr/lib/python2.6/dist-packages/crm/cibconfig.py", line 718, in
> cli_format
> s = cli_format(l,format)
> File "/usr/lib/python2.6/dist-packages/crm/cliformat.py", line 31, in
> cli_format
> return ' '.join(pl)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 22:
> ordinal not in range(128)
> 
> root at node1:~# crm_mon -1
> ============
> Last updated: Wed Oct 6 10:50:49 2010
> Stack: openais
> Current DC: node1 - partition with quorum
> Version: 1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd
> 3 Nodes configured, 3 expected votes
> 4 Resources configured.
> ============
> 
> Online: [ node1 node2 node3 ]
> 
> VirtIP (ocf::heartbeat:IPaddr2): Started node1
> MonSite (ocf::heartbeat:apache): Started node1
> SecIP (ocf::heartbeat:IPaddr2): Started node2
> 
> 
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs:
> http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker

Try to configure the resource-stickiness within the resource and not within the 
clone.

-- 
Dr. Michael Schwartzkopff
Guardinistr. 63
81375 München

Tel: (0163) 172 50 98
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101006/5019539f/attachment-0003.sig>


More information about the Pacemaker mailing list