<br><br>On Tuesday, July 28, 2020, Ulrich Windl <<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a>> wrote:<br>>>>> Gabriele Bulfon <<a href="mailto:gbulfon@sonicle.com">gbulfon@sonicle.com</a>> schrieb am 28.07.2020 um 09:35 in<br>> Nachricht <1046247888.11369.1595921749049@www>:<br>>> Thanks, I patched all the scripts in build to have "#!/bin/bash" in head, and<br>>> I receive no errors now.<br>><br>> If it's needed, those scripts were buggy anyway.<br><br>How does that mean the script is buggy? It would depend on what /bin/sh is linked to on a particular system.<br><br>>There is a "checkbashisms" program (in SLES at least) that can check whether a shell script actually needs BASH (or compatible)...<br><br>That's available for RHEL too. The question is whether it's worth modifying libraries that are core to resource-agents, essentially for compatibility with vanilla ksh. The conservative answer is no, although there is a case to be made in favor of the change. The local keyword has been there for years. A lot of shells besides bash support the local keyword, and even if ksh is the default shell on a user's system, they can likely use a different one if needed, as Gabriele has done.<br>><br>>> Though, the IP is not configured :( I'm looking at it...<br>>> Is there any easy way to debug what's doing on the IP script?<br>>> <br>>> Gabriele<br>>> <br>>> <br>>> Sonicle S.r.l.<br>>> :<br>>> <a href="http://www.sonicle.com">http://www.sonicle.com</a><br>>> Music:<br>>> <a href="http://www.gabrielebulfon.com">http://www.gabrielebulfon.com</a><br>>> Quantum Mechanics :<br>>> <a href="http://www.cdbaby.com/cd/gabrielebulfon">http://www.cdbaby.com/cd/gabrielebulfon</a><br>>> ----------------------------------------------------------------------------<br>>> ------<br>>> Da: Ulrich Windl<br>>> A: <a href="mailto:users@clusterlabs.org">users@clusterlabs.org</a><br>>> Data: 28 luglio 2020 9.12.41 CEST<br>>> Oggetto: [ClusterLabs] Antw: [EXT] Re: ip address configuration problem<br>>> You could try replacing "local" with "typeset", also.<br>>> Reid Wahl<br>>> schrieb am 28.07.2020 um 09:05 in Nachricht<br>>> :<br>>> By the way, it doesn't necessarily have to be bash. Upon looking further, a<br>>> lot of shells support the `local` keyword, even though it's not required by<br>>> the POSIX standard. Plain ksh, however, does not :(<br>>> On Monday, July 27, 2020, Reid Wahl<br>>> wrote:<br>>> Hi, Gabriele. The `local` keyword is a bash built-in and not available in<br>>> some other shells (e.g., ksh). It's used in `have_binary()`, so it's<br>>> causing `check_binary(/usr/gnu/bin/awk)` to fail. It's also causing all the<br>>> "local: not found" errors. I just reproduced it to make sure.<br>>> check_binary () {<br>>> if ! have_binary "$1"; then<br>>> if [ "$OCF_NOT_RUNNING" = 7 ]; then<br>>> # Chances are we have a fully setup OCF environment<br>>> ocf_exit_reason "Setup problem: couldn't find command: $1"<br>>> else<br>>> echo "Setup problem: couldn't find command: $1"<br>>> fi<br>>> exit $OCF_ERR_INSTALLED<br>>> fi<br>>> }<br>>> have_binary () {<br>>> if [ "$OCF_TESTER_FAIL_HAVE_BINARY" = "1" ]; then<br>>> false<br>>> else<br>>> local bin=`echo $1 | sed -e 's/ -.*//'`<br>>> test -x "`which $bin 2/dev/null`"<br>>> fi<br>>> }<br>>> Is bash available on your system?<br>>> On Mon, Jul 27, 2020 at 8:34 AM Gabriele Bulfon<br>>> wrote:<br>>> Hello,<br>>> after configuring crm for IP automatic configuration, I stumbled upon a<br>>> problem with the IPaddr utiliy that I don't understand:<br>>> IPaddr(xstha2_san0_IP)[10439]: 2020/07/27_17:26:17 ERROR: Setup problem:<br>>> couldn't find command: /usr/gnu/bin/awk<br>>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:<br>>> xstha2_san0_IP_start_0:10439:stderr [<br>>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[71]: local: not found [No such<br>>> file or directory] ]<br>>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:<br>>> xstha2_san0_IP_start_0:10439:stderr [<br>>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[354]: local: not found [No such<br>>> file or directory] ]<br>>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:<br>>> xstha2_san0_IP_start_0:10439:stderr [<br>>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[355]: local: not found [No such<br>>> file or directory] ]<br>>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:<br>>> xstha2_san0_IP_start_0:10439:stderr [<br>>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[356]: local: not found [No such<br>>> file or directory] ]<br>>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:<br>>> xstha2_san0_IP_start_0:10439:stderr [ ocf-exit-reason:Setup problem:<br>>> couldn't find command: /usr/gnu/bin/awk ]<br>>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:<br>>> xstha2_san0_IP_start_0:10439:stderr [<br>>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[185]: local: not found [No such<br>>> file or directory] ]<br>>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:<br>>> xstha2_san0_IP_start_0:10439:stderr [<br>>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[186]: local: not found [No such<br>>> file or directory] ]<br>>> Jul 27 17:26:17 [10258] lrmd: info: log_finished: finished -<br>>> rsc:xstha2_san0_IP action:start call_id:22 pid:10439 exit-code:5<br>>> exec-time:91ms queue-time:0ms<br>>> It says it cannot find /usr/gnu/bin/awk but this is absolutely not true!<br>>> sonicle@xstorage1:/sonicle/home# ls -l /usr/gnu/bin/awk<br>>> -r-xr-xr-x 1 root bin 881864 Jun 1 12:25 /usr/gnu/bin/awk<br>>> sonicle@xstorage1:/sonicle/home# file /usr/gnu/bin/awk<br>>> /usr/gnu/bin/awk: ELF 64-bit LSB executable AMD64 Version 1, dynamically<br>>> linked, not stripped, no debugging information available<br>>> what may be happening??<br>>> Thanks!<br>>> Gabriele<br>>> Sonicle S.r.l. : <a href="http://www.sonicle.com">http://www.sonicle.com</a><br>>> Music: <a href="http://www.gabrielebulfon.com">http://www.gabrielebulfon.com</a><br>>> Quantum Mechanics : <a href="http://www.cdbaby.com/cd/gabrielebulfon">http://www.cdbaby.com/cd/gabrielebulfon</a><br>>> _______________________________________________<br>>> Manage your subscription:<br>>> <a href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>>> ClusterLabs home: <a href="https://www.clusterlabs.org/">https://www.clusterlabs.org/</a><br>>> --<br>>> Regards,<br>>> Reid Wahl, RHCA<br>>> Software Maintenance Engineer, Red Hat<br>>> CEE - Platform Support Delivery - ClusterHA<br>>> --<br>>> Regards,<br>>> Reid Wahl, RHCA<br>>> Software Maintenance Engineer, Red Hat<br>>> CEE - Platform Support Delivery - ClusterHA<br>>> _______________________________________________<br>>> Manage your subscription:<br>>> <a href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>>> ClusterLabs home: <a href="https://www.clusterlabs.org/">https://www.clusterlabs.org/</a><br>><br>><br>><br>> _______________________________________________<br>> Manage your subscription:<br>> <a href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>><br>> ClusterLabs home: <a href="https://www.clusterlabs.org/">https://www.clusterlabs.org/</a><br>><br>><br><br>-- <br><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Regards,<br><br></div>Reid Wahl, RHCA<br></div><div>Software Maintenance Engineer, Red Hat<br></div>CEE - Platform Support Delivery - ClusterHA</div></div></div></div></div></div></div></div></div></div></div></div></div><br>