Skip to content
Browse files

Merge branch 'iscsi' of git://github.com/fghaas/resource-agents

  • Loading branch information...
2 parents 1b0131e + 86939c9 commit 33a6b700d2921993aef9c90429592ddd99324fc8 @dmuhamedagic dmuhamedagic committed May 22, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 heartbeat/iSCSILogicalUnit
View
8 heartbeat/iSCSILogicalUnit
@@ -315,20 +315,20 @@ iSCSILogicalUnit_monitor() {
case $OCF_RESKEY_implementation in
iet)
# Figure out and set the target ID
- TID=`sed -ne "s/tid:\([[:digit:]]\+\) name:${OCF_RESKEY_target_iqn}/\1/p" < /proc/net/iet/volume`
+ TID=`sed -ne "s/tid:\([[:digit:]]\+\) name:${OCF_RESKEY_target_iqn}$/\1/p" < /proc/net/iet/volume`
if [ -z "${TID}" ]; then
# Our target is not configured, thus we're not
# running.
return $OCF_NOT_RUNNING
fi
# FIXME: this looks for a matching LUN and path, but does
# not actually test for the correct target ID.
- grep -E -q "[[:space:]]+lun:${OCF_RESKEY_lun}.*path:${OCF_RESKEY_path}" /proc/net/iet/volume && return $OCF_SUCCESS
+ grep -E -q "[[:space:]]+lun:${OCF_RESKEY_lun}.*path:${OCF_RESKEY_path}$" /proc/net/iet/volume && return $OCF_SUCCESS
;;
tgt)
# Figure out and set the target ID
TID=`tgtadm --lld iscsi --op show --mode target \
- | sed -ne "s/^Target \([[:digit:]]\+\): ${OCF_RESKEY_target_iqn}/\1/p"`
+ | sed -ne "s/^Target \([[:digit:]]\+\): ${OCF_RESKEY_target_iqn}$/\1/p"`
if [ -z "$TID" ]; then
# Our target is not configured, thus we're not
# running.
@@ -337,7 +337,7 @@ iSCSILogicalUnit_monitor() {
# This only looks for the backing store, but does not test
# for the correct target ID and LUN.
tgtadm --lld iscsi --op show --mode target \
- | grep -E -q "[[:space:]]+Backing store.*: ${OCF_RESKEY_path}" && return $OCF_SUCCESS
+ | grep -E -q "[[:space:]]+Backing store.*: ${OCF_RESKEY_path}$" && return $OCF_SUCCESS
;;
lio)
configfs_path="/sys/kernel/config/target/iscsi/${OCF_RESKEY_target_iqn}/tpgt_1/lun/lun_${OCF_RESKEY_lun}/${OCF_RESOURCE_INSTANCE}/udev_path"

0 comments on commit 33a6b70

Please sign in to comment.
Something went wrong with that request. Please try again.