Running obdfilter-survey where "case=disk" and targets are
repeated with same OST's names. obdfilter-survey throws
"error: attach: File exists". This is because the on the first
iteration the attach and setup is already done and subsequently
the attach fails as the device/uuid is already present.
Test-Parameters: trivial testlist=obdfilter-survey
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I8ab9ea905ec86b9e1aa8906bebcc38fee0fdbc23
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51034
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
exit 1
fi
client_name=${ost_name}_ecc
- remote_shell $host \
- "$lctl <<-EOF
- attach echo_client $client_name ${client_name}_UUID
- setup $ost_name $stack_type
- EOF"
+ # Only 'attach' if '{client_name}_uuid' not already present
+ if ! [[ $(lctl dl) =~ $client_name ]]; then
+ remote_shell $host \
+ "$lctl <<-EOF
+ attach echo_client $client_name \
+ ${client_name}_UUID
+ setup $ost_name $stack_type
+ EOF"
+ fi
ec=$(get_devno $host echo_client $client_name)
if [ -z "$ec" ]; then
echo "Can't setup echo-client"