[Linux-HA] Re: LSB Compliant Filesystem Script

Lasantha Marian x72m35 at gmail.com
Mon Sep 17 03:31:59 MDT 2007


Andrew,

FYI: My system setup
Ubuntu-Server (amd64)
Heartbeat 2.0.7 (Ubuntu binary heartbeat-2 (2.0.7-2))
DRBD 8.0.6 (Compiled as a module)
Dell PowerDedge 2900

Following is the result of Filesystem script run with "set -x;
/etc/ha.d/resource.d/Filesystem /dev/drbd0 /ha/spool/Exim ext3 status"
+ /etc/ha.d/resource.d/Filesystem /dev/drbd0 /ha/spool/Exim ext3 status
/usr/lib/ocf/resource.d/heartbeat/Filesystem: 466: Syntax error: Bad
substitution
2007/09/17_14:42:06 ERROR: Filesystem Incompliant argument
ERROR: Filesystem Incompliant argument

Following is the result of Filesystem script run with "bash -x
/etc/ha.d/resource.d/Filesystem /dev/drbd0 /ha/spool/Exim ext3 status"
+ bash -x /etc/ha.d/resource.d/Filesystem /dev/drbd0 /ha/spool/Exim ext3
status
+ unset LC_ALL
+ export LC_ALL
+ unset LANGUAGE
+ export LANGUAGE
+ . /etc/ha.d/resource.d/hto-mapfuncs
++ PARAMETER_SPLIT_SIGN==
++ OCF_ROOT_DIR=/usr/lib/ocf
++ OCF_RA_DIR=/usr/lib/ocf/resource.d/
++ BASENAME=/usr/bin/basename
+ case $# in
+ fstype=ext3
+ operation=status
+ options=
+ case "$operation" in
+ ra_execocf rsc_id=Filesystem_/dev/drbd0 rsc_type=Filesystem
provider=heartbeat status device=/dev/drbd0 directory=/ha/spool/Exim
fstype=ext3 options=
+ ra_ocfinit rsc_id=Filesystem_/dev/drbd0 rsc_type=Filesystem
provider=heartbeat status device=/dev/drbd0 directory=/ha/spool/Exim
fstype=ext3 options=
+ RSCIDPAIR=rsc_id=Filesystem_/dev/drbd0
+ RSCTYPEPAIR=rsc_type=Filesystem
++ echo rsc_type=Filesystem
++ cut -d= -f2
+ RSCTYPE=Filesystem
+ PROVIDERPAIR=provider=heartbeat
++ echo provider=heartbeat
++ cut -d= -f2
+ PROVIDER=heartbeat
+ OPERATION=status
+ setup_OCF_env_vars rsc_id=Filesystem_/dev/drbd0
++ echo rsc_id=Filesystem_/dev/drbd0
++ cut -d= -f1
+ hbvarname=rsc_id
++ echo rsc_id=Filesystem_/dev/drbd0
++ cut -d= -f2
+ hbvarvalue=Filesystem_/dev/drbd0
+ case $hbvarname in
+ '[' '!' -z Filesystem_/dev/drbd0 ']'
+ ocfvarname=OCF_RESOURCE_INSTANCE
+ eval OCF_RESOURCE_INSTANCE=Filesystem_/dev/drbd0
++ OCF_RESOURCE_INSTANCE=Filesystem_/dev/drbd0
+ export OCF_RESOURCE_INSTANCE
+ setup_OCF_env_vars rsc_type=Filesystem
++ echo rsc_type=Filesystem
++ cut -d= -f1
+ hbvarname=rsc_type
++ echo rsc_type=Filesystem
++ cut -d= -f2
+ hbvarvalue=Filesystem
+ case $hbvarname in
+ '[' '!' -z hbvarvalue ']'
+ rsc_type=Filesystem
+ ocfvarname=OCF_RESOURCE_TYPE
+ eval OCF_RESOURCE_TYPE=Filesystem
++ OCF_RESOURCE_TYPE=Filesystem
+ export OCF_RESOURCE_TYPE
+ setup_OCF_env_vars provider=heartbeat
++ echo provider=heartbeat
++ cut -d= -f1
+ hbvarname=provider
++ echo provider=heartbeat
++ cut -d= -f2
+ hbvarvalue=heartbeat
+ case $hbvarname in
+ '[' '!' -z hbvarvalue ']'
+ ocfvarname=OCF_RESOURCE_PROVIDER
+ eval OCF_RESOURCE_PROVIDER=heartbeat
++ OCF_RESOURCE_PROVIDER=heartbeat
+ export OCF_RESOURCE_PROVIDER
+ OCF_RA_VERSION_MAJOR=1
+ export OCF_RA_VERSION_MAJOR
+ OCF_RA_VERSION_MINOR=0
+ export OCF_RA_VERSION_MINOR
+ OCF_ROOT=/usr/lib/ocf
+ export OCF_ROOT
+ . /usr/lib/heartbeat/ocf-shellfuncs
++ HA_D=/etc/ha.d
+++ basename /etc/ha.d/resource.d/Filesystem
++ __SCRIPT_NAME=Filesystem
++ . /etc/ha.d/shellfuncs
+++ prefix=/usr
+++ exec_prefix=/usr
+++ : /etc/ha.d
+++ : /etc/ha.d/rc.d
+++ : /etc/ha.d/conf
+++ : /etc/ha.d/ha.cf
+++ : /var/lib/heartbeat
+++ : /var/run/heartbeat/rsctmp
+++ : /var/lib/heartbeat/fifo
+++ : /usr/lib/heartbeat
+++ : '%Y/%m/%d_%T '
+++ : /dev/null
+++ : /etc/ha.d/resource.d
+++ : /usr/share/doc/heartbeat
+++ : Filesystem
+++ : 'Filesystem[2249]'
+++ : /var/run/
+++ : /var/lock/subsys/
+++ export HA_DIR HA_RCDIR HA_FIFO HA_BIN
+++ export HA_DEBUGLOG HA_LOGFILE HA_LOGFACILITY
+++ export HA_DATEFMT HA_RESOURCEDIR HA_DOCDIR
+++ MKTEMP=/bin/mktemp
+++ TESTPROG=/usr/bin/test
++ __ocf_set_defaults rsc_id=Filesystem_/dev/drbd0 rsc_type=Filesystem
provider=heartbeat status device=/dev/drbd0 directory=/ha/spool/Exim
fstype=ext3 options=
++ __OCF_ACTION=rsc_id=Filesystem_/dev/drbd0
++ unset LANG
++ LC_ALL=C
++ export LC_ALL
++ OCF_SUCCESS=0
++ OCF_ERR_GENERIC=1
++ OCF_ERR_ARGS=2
++ OCF_ERR_UNIMPLEMENTED=3
++ OCF_ERR_PERM=4
++ OCF_ERR_INSTALLED=5
++ OCF_ERR_CONFIGURED=6
++ OCF_NOT_RUNNING=7
++ OCF_RUNNING_MASTER=8
++ OCF_FAILED_MASTER=9
++ '[' -z '' ']'
++ : 0
++ '[' -z /usr/lib/ocf ']'
++ '[' '!' -d /usr/lib/ocf ']'
++ '[' -z Filesystem ']'
++ '[' -z 1 ']'
++ '[' x1 '!=' x1 ']'
++ '[' -z 0 ']'
++ '[' xrsc_id=Filesystem_/dev/drbd0 = xmeta-data ']'
++ '[' -z Filesystem_/dev/drbd0 ']'
+ shift 4
+ ra_setenv device=/dev/drbd0 directory=/ha/spool/Exim fstype=ext3 options=
+ lastenvar=
+ for envar in '$*'
++ echo device=/dev/drbd0
++ cut -s -d= -f1
+ ifvarname=device
+ '[' -z device ']'
+ setup_OCF_prefix device=/dev/drbd0
++ echo device=/dev/drbd0
++ cut -d= -f1
+ hbvarname=device
++ echo device=/dev/drbd0
++ cut -d= -f2-
+ hbvarvalue=/dev/drbd0
+ ocfvarname=OCF_RESKEY_device
+ eval 'OCF_RESKEY_device=$hbvarvalue'
++ OCF_RESKEY_device=/dev/drbd0
+ export OCF_RESKEY_device
+ lastenvar=device=/dev/drbd0
+ for envar in '$*'
++ echo directory=/ha/spool/Exim
++ cut -s -d= -f1
+ ifvarname=directory
+ '[' -z directory ']'
+ setup_OCF_prefix directory=/ha/spool/Exim
++ echo directory=/ha/spool/Exim
++ cut -d= -f1
+ hbvarname=directory
++ echo directory=/ha/spool/Exim
++ cut -d= -f2-
+ hbvarvalue=/ha/spool/Exim
+ ocfvarname=OCF_RESKEY_directory
+ eval 'OCF_RESKEY_directory=$hbvarvalue'
++ OCF_RESKEY_directory=/ha/spool/Exim
+ export OCF_RESKEY_directory
+ lastenvar=directory=/ha/spool/Exim
+ for envar in '$*'
++ echo fstype=ext3
++ cut -s -d= -f1
+ ifvarname=fstype
+ '[' -z fstype ']'
+ setup_OCF_prefix fstype=ext3
++ echo fstype=ext3
++ cut -d= -f1
+ hbvarname=fstype
++ echo fstype=ext3
++ cut -d= -f2-
+ hbvarvalue=ext3
+ ocfvarname=OCF_RESKEY_fstype
+ eval 'OCF_RESKEY_fstype=$hbvarvalue'
++ OCF_RESKEY_fstype=ext3
+ export OCF_RESKEY_fstype
+ lastenvar=fstype=ext3
+ for envar in '$*'
++ echo options=
++ cut -s -d= -f1
+ ifvarname=options
+ '[' -z options ']'
+ setup_OCF_prefix options=
++ echo options=
++ cut -d= -f1
+ hbvarname=options
++ echo options=
++ cut -d= -f2-
+ hbvarvalue=
+ ocfvarname=OCF_RESKEY_options
+ eval 'OCF_RESKEY_options=$hbvarvalue'
++ OCF_RESKEY_options=
+ export OCF_RESKEY_options
+ lastenvar=options=
+ ra_getpathname
++ basename Filesystem
+ BASENAME=Filesystem
+ '[' Filesystem = Filesystem ']'
+ RAOCFPATH=/usr/lib/ocf/resource.d/heartbeat/Filesystem
+ '[' '!' -x /usr/lib/ocf/resource.d/heartbeat/Filesystem ']'
+ case $OPERATION in
+ /usr/lib/ocf/resource.d/heartbeat/Filesystem status
/usr/lib/ocf/resource.d/heartbeat/Filesystem: 466: Syntax error: Bad
substitution
+ ocf_return_status=2
+ case $ocf_return_status in
+ log_and_print 'ERROR: Filesystem Incompliant argument'
+ ha_log 'ERROR: Filesystem Incompliant argument'
+ '[' x = xyes ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
++ hadate
++ date '+%Y/%m/%d_%T '
+ Echo 2007/09/17_14:40:54 'ERROR: Filesystem Incompliant argument'
+ echo 2007/09/17_14:40:54 'ERROR: Filesystem Incompliant argument'
2007/09/17_14:40:54 ERROR: Filesystem Incompliant argument
+ '[' -n /dev/null ']'
+ : appending to /dev/null
++ hadate
++ date '+%Y/%m/%d_%T '
+ Echo 'Filesystem[2249]:       2007/09/17_14:40:54' 'ERROR: Filesystem
Incompliant argument'
+ echo 'Filesystem[2249]:       2007/09/17_14:40:54' 'ERROR: Filesystem
Incompliant argument'
+ echo 'ERROR: Filesystem Incompliant argument'
ERROR: Filesystem Incompliant argument
+ return 2

Packaged original "Filesystem" script is attached in this message.

Please let me know if you need any further info from my setup. Glad to
be of any help on this.

Thanks and best regards,

Lasantha.

*-------- Original Message --------*
*Subject: * 	[Linux-HA] Re: LSB Compliant Filesystem Script
*Date: * 	Mon, 17/Sep/2007 2:20:15 PM +0550
*From: * 	"Andrew Beekhof" <beekhof at gmail.com>
*To: * 	"General Linux-HA mailing list" <linux-ha at lists.linux-ha.org>


> On 9/15/07, Lasantha Marian <x72m35 at gmail.com> wrote:
>   
>> Andrew,
>>
>> I've started working on points that you have given to debug the scripts.
>> I ended up identifying that "Filesystem_notify()" function in the
>> "Filesystem" script causes the problem.
>>     
>
> Filesystem_notify was being called for a non-OCFS2 filesystem??
>
> can you attach the "set -x" output and the Filesystem script please?
> (we'd like to make sure it gets fixed for everyone)
>
>   
>> Then I completely commented out
>> the function as it is related to OCFS2 type. Viola,  it works. Now I
>> have been running it for about two days and no side effects.
>>
>> Thanks and kind regards,
>>
>> Lasantha.
>>
>>     
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Filesystem
URL: <http://lists.linux-ha.org/pipermail/linux-ha/attachments/20070917/58dc041f/attachment.ksh>


More information about the Linux-HA mailing list