<div style="font-family: Arial; font-size: 13;">I tried adding some debug in ocf-shellfuncs, showing env and ps -ef into the corosync.log<br>I suspect it's always using ksh, because in the env output I produced I find this: KSH_VERSION=.sh.version<br>This is normally not present in the environment, unless ksh is running the shell.<br>I also tried modifiying all ocf shells with "#!/usr/bin/bash" at the beginning, no way, same output.<br><br>Any idea how can I change the used shell to support "local" variables?<br><br>Gabriele<br><br><div id="wt-mailcard"><div style="font-family: Arial;">----------------------------------------------------------------------------------------<br></div><div style="font-family: Arial;"><b>Sonicle S.r.l. </b>: <a href="http://www.sonicle.com/" target="_new">http://www.sonicle.com</a></div><div style="font-family: Arial;"><b>Music: </b><a href="http://www.gabrielebulfon.com/" target="_new">http://www.gabrielebulfon.com</a></div><div style="font-family: Arial;"><b>Quantum Mechanics : </b><a href="http://www.cdbaby.com/cd/gabrielebulfon" target="_new">http://www.cdbaby.com/cd/gabrielebulfon</a></div></div><br><hr><br><br><font face="Arial, Helvetica, sans-serif" size="2"><b>Da:</b> Gabriele Bulfon <gbulfon@sonicle.com><br><b>A:</b> kgaillot@redhat.com Cluster Labs - All topics related to open-source clustering welcomed <users@clusterlabs.org> <br><b>Data:</b> 26 agosto 2016 10.12.13 CEST<br><b>Oggetto:</b> Re: [ClusterLabs] ocf::heartbeat:IPaddr<br></font><br><br><blockquote style="BORDER-LEFT: #000080 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px"><div style="font-family: Arial; font-size: 13;">I looked around what you suggested, inside ocf-binaris and ocf-shellfuncs etc.<br>So I found also these logs in corosync.log :<br><br>Aug 25 17:50:33 [2250]       crmd:   notice: process_lrm_event: xstorage1-xstorage2_wan2_IP_start_0:22 [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[71]: local: not found [No such file or directory]\n/usr/lib/ocf/resource.d/heartbeat/IPaddr[354]: local: not found [No such file or directory]\n/usr/lib/ocf/resource.d/heartbeat/IPaddr[355]: local: not found [No such file or directory]\n/usr/lib/ocf/resource.d/heartbeat/IPaddr[356]: local: not found [No such file or directory]\nocf-exit-reason:Setup problem: coul<br><br>Aug 25 17:50:33 [2246]       lrmd:   notice: operation_finished:        xstorage2_wan2_IP_start_0:3613:stderr [ /usr/lib/ocf/resource.d/heartbeat/IPaddr[71]: local: not found [No such file or directory] ]<br><br>Looks like the shell is not happy with the "local" variable definition.<br>I tried running ocf-shellfuncs manually with sh and bash and they all run without errors.<br>How can I see what shell is running these scripts? <br><br><div id="wt-mailcard"><div style="font-family: Arial;">----------------------------------------------------------------------------------------<br></div><div style="font-family: Arial;"><b>Sonicle S.r.l. </b>: <a href="http://www.sonicle.com/" target="_new">http://www.sonicle.com</a></div><div style="font-family: Arial;"><b>Music: </b><a href="http://www.gabrielebulfon.com/" target="_new">http://www.gabrielebulfon.com</a></div><div style="font-family: Arial;"><b>Quantum Mechanics : </b><a href="http://www.cdbaby.com/cd/gabrielebulfon" target="_new">http://www.cdbaby.com/cd/gabrielebulfon</a></div></div><tt><br><br><br>----------------------------------------------------------------------------------<br><br>Da: Ken Gaillot <kgaillot@redhat.com><br>A: users@clusterlabs.org <br>Data: 25 agosto 2016 18.07.42 CEST<br>Oggetto: Re: [ClusterLabs] ocf::heartbeat:IPaddr<br><br></tt><blockquote style="BORDER-LEFT: #000080 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px"><tt>On 08/25/2016 10:51 AM, Gabriele Bulfon wrote:<br>> Hi,<br>> <br>> I'm advancing with this monster cluster on XStreamOS/illumos ;)<br>> <br>> In the previous older tests I used heartbeat, and I had these lines to<br>> take care of the swapping public IP addresses:<br>> <br>> primitive xstorage1_wan1_IP ocf:heartbeat:IPaddr params ip="1.2.3.4"<br>> cidr_netmask="255.255.255.0" nic="e1000g1"<br>> primitive xstorage2_wan2_IP ocf:heartbeat:IPaddr params ip="1.2.3.5"<br>> cidr_netmask="255.255.255.0" nic="e1000g1"<br>> <br>> location xstorage1_wan1_IP_pref xstorage1_wan1_IP 100: xstorage1<br>> location xstorage2_wan2_IP_pref xstorage2_wan2_IP 100: xstorage2<br>> <br>> They get configured, but then I get this in crm status:<br>> <br>> xstorage1_wan1_IP (ocf::heartbeat:IPaddr): Stopped<br>> xstorage2_wan2_IP (ocf::heartbeat:IPaddr): Stopped<br>> <br>> Failed Actions:<br>> * xstorage1_wan1_IP_start_0 on xstorage1 'not installed' (5): call=20,<br>> status=complete, exitreason='Setup problem: couldn't find command:<br>> /usr/bin/gawk',<br>> last-rc-change='Thu Aug 25 17:50:32 2016', queued=1ms, exec=158ms<br>> * xstorage2_wan2_IP_start_0 on xstorage1 'not installed' (5): call=22,<br>> status=complete, exitreason='Setup problem: couldn't find command:<br>> /usr/bin/gawk',<br>> last-rc-change='Thu Aug 25 17:50:33 2016', queued=1ms, exec=29ms<br>> * xstorage1_wan1_IP_start_0 on xstorage2 'not installed' (5): call=22,<br>> status=complete, exitreason='Setup problem: couldn't find command:<br>> /usr/bin/gawk',<br>> last-rc-change='Thu Aug 25 17:50:30 2016', queued=1ms, exec=36ms<br>> * xstorage2_wan2_IP_start_0 on xstorage2 'not installed' (5): call=20,<br>> status=complete, exitreason='Setup problem: couldn't find command:<br>> /usr/bin/gawk',<br>> last-rc-change='Thu Aug 25 17:50:29 2016', queued=0ms, exec=150ms<br>> <br>> <br>> The crm configure process already checked of the presence of the<br>> required IPaddr shell, and it was ok.<br>> Now looks like it's looking for "/usr/bin/gawk", and that is actually there!<br>> Is there any known incompatibility with the mixed heartbeat ocf ? Should<br>> I use corosync specific ocf files or something else?<br><br>"heartbeat" in this case is just an OCF provider name, and has nothing<br>to do with the heartbeat messaging layer, other than having its origin<br>in the same project. There actually has been a recent proposal to rename<br>the provider to "clusterlabs" to better reflect the current reality.<br><br>The "couldn't find command" message comes from the ocf-binaries shell<br>functions. If you look at have_binary() there, it uses sed and which,<br>and I'm guessing that fails on your OS somehow. You may need to patch it.<br><br>> Thanks again!<br>> <br>> Gabriele<br>> <br>> ----------------------------------------------------------------------------------------<br>> *Sonicle S.r.l. *: http://www.sonicle.com <http://www.sonicle.com/><br>> *Music: *http://www.gabrielebulfon.com <http://www.gabrielebulfon.com/><br>> *Quantum Mechanics : *http://www.cdbaby.com/cd/gabrielebulfon<br><br>_______________________________________________<br>Users mailing list: Users@clusterlabs.org<br>http://clusterlabs.org/mailman/listinfo/users<br><br>Project Home: http://www.clusterlabs.org<br>Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf<br>Bugs: http://bugs.clusterlabs.org<br><br><br></tt></blockquote></div>

<pre>_______________________________________________
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
</pre></blockquote></div>