[ClusterLabs] ip address configuration problem

Reid Wahl nwahl at redhat.com
Tue Jul 28 04:21:57 EDT 2020


On Tuesday, July 28, 2020, Ulrich Windl <Ulrich.Windl at rz.uni-regensburg.de>
wrote:
>>>> Gabriele Bulfon <gbulfon at sonicle.com> schrieb am 28.07.2020 um 09:35 in
> Nachricht <1046247888.11369.1595921749049 at www>:
>> Thanks, I patched all the scripts in build to have "#!/bin/bash" in
head, and
>> I receive no errors now.
>
> If it's needed, those scripts were buggy anyway.

How does that mean the script is buggy? It would depend on what /bin/sh is
linked to on a particular system.

>There is a "checkbashisms" program (in SLES at least) that can check
whether a shell script actually needs BASH (or compatible)...

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.
>
>> Though, the IP is not configured :( I'm looking at it...
>> Is there any easy way to debug what's doing on the IP script?
>>
>> Gabriele
>>
>>
>> Sonicle S.r.l.
>> :
>> http://www.sonicle.com
>> Music:
>> http://www.gabrielebulfon.com
>> Quantum Mechanics :
>> http://www.cdbaby.com/cd/gabrielebulfon
>>
----------------------------------------------------------------------------
>> ------
>> Da: Ulrich Windl
>> A: users at clusterlabs.org
>> Data: 28 luglio 2020 9.12.41 CEST
>> Oggetto: [ClusterLabs] Antw: [EXT] Re: ip address configuration problem
>> You could try replacing "local" with "typeset", also.
>> Reid Wahl
>> schrieb am 28.07.2020 um 09:05 in Nachricht
>> :
>> By the way, it doesn't necessarily have to be bash. Upon looking
further, a
>> lot of shells support the `local` keyword, even though it's not required
by
>> the POSIX standard. Plain ksh, however, does not :(
>> On Monday, July 27, 2020, Reid Wahl
>> wrote:
>> Hi, Gabriele. The `local` keyword is a bash built-in and not available in
>> some other shells (e.g., ksh). It's used in `have_binary()`, so it's
>> causing `check_binary(/usr/gnu/bin/awk)` to fail. It's also causing all
the
>> "local: not found" errors. I just reproduced it to make sure.
>> check_binary () {
>> if ! have_binary "$1"; then
>> if [ "$OCF_NOT_RUNNING" = 7 ]; then
>> # Chances are we have a fully setup OCF environment
>> ocf_exit_reason "Setup problem: couldn't find command: $1"
>> else
>> echo "Setup problem: couldn't find command: $1"
>> fi
>> exit $OCF_ERR_INSTALLED
>> fi
>> }
>> have_binary () {
>> if [ "$OCF_TESTER_FAIL_HAVE_BINARY" = "1" ]; then
>> false
>> else
>> local bin=`echo $1 | sed -e 's/ -.*//'`
>> test -x "`which $bin 2/dev/null`"
>> fi
>> }
>> Is bash available on your system?
>> On Mon, Jul 27, 2020 at 8:34 AM Gabriele Bulfon
>> wrote:
>> Hello,
>> after configuring crm for IP automatic configuration, I stumbled upon a
>> problem with the IPaddr utiliy that I don't understand:
>> IPaddr(xstha2_san0_IP)[10439]: 2020/07/27_17:26:17 ERROR: Setup problem:
>> couldn't find command: /usr/gnu/bin/awk
>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:
>> xstha2_san0_IP_start_0:10439:stderr [
>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[71]: local: not found [No such
>> file or directory] ]
>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:
>> xstha2_san0_IP_start_0:10439:stderr [
>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[354]: local: not found [No such
>> file or directory] ]
>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:
>> xstha2_san0_IP_start_0:10439:stderr [
>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[355]: local: not found [No such
>> file or directory] ]
>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:
>> xstha2_san0_IP_start_0:10439:stderr [
>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[356]: local: not found [No such
>> file or directory] ]
>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:
>> xstha2_san0_IP_start_0:10439:stderr [ ocf-exit-reason:Setup problem:
>> couldn't find command: /usr/gnu/bin/awk ]
>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:
>> xstha2_san0_IP_start_0:10439:stderr [
>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[185]: local: not found [No such
>> file or directory] ]
>> Jul 27 17:26:17 [10258] lrmd: notice: operation_finished:
>> xstha2_san0_IP_start_0:10439:stderr [
>> /usr/lib/ocf/resource.d/heartbeat/IPaddr[186]: local: not found [No such
>> file or directory] ]
>> Jul 27 17:26:17 [10258] lrmd: info: log_finished: finished -
>> rsc:xstha2_san0_IP action:start call_id:22 pid:10439 exit-code:5
>> exec-time:91ms queue-time:0ms
>> It says it cannot find /usr/gnu/bin/awk but this is absolutely not true!
>> sonicle at xstorage1:/sonicle/home# ls -l /usr/gnu/bin/awk
>> -r-xr-xr-x 1 root bin 881864 Jun 1 12:25 /usr/gnu/bin/awk
>> sonicle at xstorage1:/sonicle/home# file /usr/gnu/bin/awk
>> /usr/gnu/bin/awk: ELF 64-bit LSB executable AMD64 Version 1, dynamically
>> linked, not stripped, no debugging information available
>> what may be happening??
>> Thanks!
>> Gabriele
>> Sonicle S.r.l. : http://www.sonicle.com
>> Music: http://www.gabrielebulfon.com
>> Quantum Mechanics : http://www.cdbaby.com/cd/gabrielebulfon
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>> ClusterLabs home: https://www.clusterlabs.org/
>> --
>> Regards,
>> Reid Wahl, RHCA
>> Software Maintenance Engineer, Red Hat
>> CEE - Platform Support Delivery - ClusterHA
>> --
>> Regards,
>> Reid Wahl, RHCA
>> Software Maintenance Engineer, Red Hat
>> CEE - Platform Support Delivery - ClusterHA
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>> ClusterLabs home: https://www.clusterlabs.org/
>
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
>

-- 
Regards,

Reid Wahl, RHCA
Software Maintenance Engineer, Red Hat
CEE - Platform Support Delivery - ClusterHA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/users/attachments/20200728/139fba1a/attachment.htm>


More information about the Users mailing list