Skip to content

Commit

Permalink
common_function: use dev_real_path as array
Browse files Browse the repository at this point in the history
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 <[email protected]>
(cherry picked from commit dc262d1)
  • Loading branch information
dsavineau committed May 5, 2020
1 parent 848169a commit 9037779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/daemon/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,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" ||
Expand Down

0 comments on commit 9037779

Please sign in to comment.