From: Nathaniel Clark Date: Fri, 8 Feb 2019 18:02:28 +0000 (-0500) Subject: LU-11947 scripts: handle ZFS targets in Lustre RA X-Git-Tag: 2.10.7-RC1~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=56c3d06ed66626f79608f3dafbe13b6719edf9cf;p=fs%2Flustre-release.git LU-11947 scripts: handle ZFS targets in Lustre RA Fixes a regression introduced in LU-11461 This handles the case of realpath of target being an empty string. Lustre-change: https://review.whamcloud.com/#/c/34217/ Lustre-commit: 7c446895595c626d731bb52113bb2df420347279 Fixes: c36d70272541 ("LU-11461 scripts: Support symlink target") Test-Parameters: trivial Signed-off-by: Nathaniel Clark Change-Id: I1bcb85908019e968ac0d69e437db217594a6565e Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/34271 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Joe Grund Reviewed-by: Oleg Drokin --- diff --git a/contrib/scripts/pacemaker/Lustre b/contrib/scripts/pacemaker/Lustre index cafb07b..ea4e140 100755 --- a/contrib/scripts/pacemaker/Lustre +++ b/contrib/scripts/pacemaker/Lustre @@ -98,9 +98,9 @@ lustre_is_mounted () { # Verify if this is consistent, check pointpoint and filesystem # against source (i.e. device) local dev=$(findmnt -t lustre -ln -o SOURCE -T $(realpath "$OCF_RESKEY_mountpoint")) + local target=$(realpath "$OCF_RESKEY_target" 2> /dev/null) - [ -n "$dev" ] && - [ "$dev" == "$OCF_RESKEY_target" -o "$dev" == $(realpath "$OCF_RESKEY_target") ] + [ -n "$dev" ] && [ "$dev" == "$OCF_RESKEY_target" -o "$dev" == "$target" ] } lustre_monitor () {