Red Hat Bugzilla – Bug 727643
Modify major resource-agent agents to provide proper return codes to pacemaker
Last modified: 2011-12-06 07:05:40 EST
Include minor modifications to resource agents to include proper return codes for use in pacemaker.
Created attachment 517669 [details] Patch to update resource-agents
Test Results: [root@ask-03 ~]# ocf-tester -o family=inet -o address=10.15.85.253 -n ip /usr/share/cluster/ip.sh Beginning tests for /usr/share/cluster/ip.sh... basename: missing operand Try `basename --help' for more information. * Your agent does not support the notify action (optional) * Your agent does not support the demote action (optional) * Your agent does not support the promote action (optional) * Your agent does not support master/slave (optional) * Your agent does not support the reload action (optional) /usr/share/cluster/ip.sh passed all tests [root@ask-03 ~]# dd if=/dev/zero of=testfile bs=1M count=100 100+0 records in 100+0 records out 104857600 bytes (105 MB) copied, 0.278565 s, 376 MB/s [root@ask-03 ~]# losetup /dev/loop0 testfile [root@ask-03 ~]# mkdir /mp/ [root@ask-03 ~]# mkfs.ext3 /dev/loop0 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 25688 inodes, 102400 blocks 5120 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 13 block groups 8192 blocks per group, 8192 fragments per group 1976 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@ask-03 ~]# ocf-tester -o name=my_fs -o device=/dev/loop0 -o mountpoint=/mp -o fstype=ext2 -n fs /usr/share/cluster/fs.sh Beginning tests for /usr/share/cluster/fs.sh... basename: missing operand Try `basename --help' for more information. * Your agent does not support the notify action (optional) * Your agent does not support the demote action (optional) * Your agent does not support the promote action (optional) * Your agent does not support master/slave (optional) * Your agent does not support the reload action (optional) /usr/share/cluster/fs.sh passed all tests [root@ask-03 ~]# losetup -d /dev/loop0 [root@ask-03 ~]# dd if=/dev/zero of=testfile bs=1M count=1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 17.43 s, 60.2 MB/s [root@ask-03 ~]# losetup /dev/loop0 testfile [root@ask-03 ~]# mkfs.gfs2 -t mycluster:mygfs2 -p lock_nolock -j3 /dev/loop0 This will destroy any data on /dev/loop0. It appears to contain: data Are you sure you want to proceed? [y/n] y Device: /dev/loop0 Blocksize: 4096 Device Size 0.98 GB (256000 blocks) Filesystem Size: 0.98 GB (255997 blocks) Journals: 3 Resource Groups: 4 Locking Protocol: "lock_nolock" Lock Table: "mycluster:mygfs2" UUID: 295CC2BD-B844-ED01-7AF9-5DE83D5524EC [root@ask-03 ~]# ocf-tester -o name=clusterfs_service -o mountpoint=/mp -o device=/dev/loop0 -o force_unmount=1 -n clusterfs /usr/share/cluster/clusterfs.sh Beginning tests for /usr/share/cluster/clusterfs.sh... basename: missing operand Try `basename --help' for more information. * Your agent does not support the notify action (optional) * Your agent does not support the demote action (optional) * Your agent does not support the promote action (optional) * Your agent does not support master/slave (optional) * Your agent does not support the reload action (optional) /usr/share/cluster/clusterfs.sh passed all tests [root@ask-03 ~]# losetup -d /dev/loop0 [root@ask-03 ~]# ocf-tester -o name=mynfsclient -o target='*' -o path='/tmp/' -n nfsclient /usr/share/cluster/nfsclient.sh Beginning tests for /usr/share/cluster/nfsclient.sh... basename: missing operand Try `basename --help' for more information. * Your agent does not support the notify action (optional) * Your agent does not support the demote action (optional) * Your agent does not support the promote action (optional) * Your agent does not support master/slave (optional) * Your agent does not support the reload action (optional) /usr/share/cluster/nfsclient.sh passed all tests <After exporting /tmp/ on 10.15.85.4> [root@ask-03 ~]# ocf-tester -o name=mynetfs -o mountpoint=/mp -o host=10.15.85.4 -o export=/tmp/ -n netfs /usr/share/cluster/netfs.sh Beginning tests for /usr/share/cluster/netfs.sh... basename: missing operand Try `basename --help' for more information. * Your agent does not support the notify action (optional) * Your agent does not support the demote action (optional) * Your agent does not support the promote action (optional) * Your agent does not support master/slave (optional) * Your agent does not support the reload action (optional) /usr/share/cluster/netfs.sh passed all tests [root@ask-03 ~]# ocf-tester -o name=mynetfs -o path=/tmp -o nfspath=nfspath -n nfsserver /usr/share/cluster/nfsserver.sh Beginning tests for /usr/share/cluster/nfsserver.sh... basename: missing operand Try `basename --help' for more information. * Your agent does not support the notify action (optional) * Your agent does not support the demote action (optional) * Your agent does not support the promote action (optional) * Your agent does not support master/slave (optional) * Your agent does not support the reload action (optional) /usr/share/cluster/nfsserver.sh passed all tests
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2011-1580.html