From 5b3dcfc02cff2604ad68b4dccd1e4fc54fc2f4ab Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 4 May 2020 15:04:38 -0400 Subject: [PATCH] common_function: use dev_real_path as array When applying ceph owner/group for Bluestore OSD with dedicated DB and/or WAL partitions then the blank spaces in the dev_real_path variable will be preserve. The result will be a single string which won't be evaluated correctly with the for loop. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1831273 Closes: #1579 Signed-off-by: Dimitri Savineau (cherry picked from commit dc262d14421f3964eea70e0cb0f4d6832120e081) --- src/daemon/common_functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/common_functions.sh b/src/daemon/common_functions.sh index 88c884b31..c9574a19f 100755 --- a/src/daemon/common_functions.sh +++ b/src/daemon/common_functions.sh @@ -274,8 +274,8 @@ function apply_ceph_ownership_to_disks { fi fi if [[ ${OSD_BLUESTORE} -eq 1 ]]; then - dev_real_path=$(resolve_symlink "$OSD_BLUESTORE_BLOCK_WAL" "$OSD_BLUESTORE_BLOCK_DB") - for partition in $(list_dev_partitions "$OSD_DEVICE" "$dev_real_path"); do + dev_real_path=($(resolve_symlink "$OSD_BLUESTORE_BLOCK_WAL" "$OSD_BLUESTORE_BLOCK_DB")) + for partition in $(list_dev_partitions "$OSD_DEVICE" "${dev_real_path[@]}"); do part_code=$(get_part_typecode "$partition") if [[ "$part_code" == "5ce17fce-4087-4169-b7ff-056cc58472be" || "$part_code" == "5ce17fce-4087-4169-b7ff-056cc58473f9" ||