That's true, but it's nice to have a tool set the required environment variables for you.
On Tuesday, July 28, 2020, Ulrich Windl <ulrich.wi...@rz.uni-regensburg.de> wrote: >>>> Reid Wahl <nw...@redhat.com> schrieb am 28.07.2020 um 09:43 in Nachricht > <CAPiuu9_P3aBgPUYJzt01c=xyhdcpjabkxd7j5wn+06+8cvz...@mail.gmail.com>: >> Not at my computer but I believe `crm_resource -r <rsc name> --force-start`. >> >> On Tuesday, July 28, 2020, Gabriele Bulfon <gbul...@sonicle.com> wrote: >>> Thanks, I patched all the scripts in build to have "#!/bin/bash" in head, >> and I receive no errors now. >>> 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? > > You could run it manually with "bash -x ..." to see what's going on. This works for any script, but some OCF RAs habe even debugging messages built in. ocf-tester's "-d" option will turn on debugging in the RA. > >>> >>> 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 <ulrich.wi...@rz.uni-regensburg.de> >>> A: users@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 <nw...@redhat.com> schrieb am 28.07.2020 um 09:05 in >> Nachricht >>> <capiuu9_wln77dmk_+wo_gvqzsyb5kxc94fztk1iqutwi7xa...@mail.gmail.com>: >>>> 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 <nw...@redhat.com> 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 <gbul...@sonicle.com> >>>> 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@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@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/ >>> >>> >>> >> >> -- >> 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/ > > -- 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/