Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
mount_lockbox: do not discover CLUSTER name
Browse files Browse the repository at this point in the history
The cluster name is already known thanks to the $CLUSTER env var so
let's re-use it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1614878
Signed-off-by: Sébastien Han <[email protected]>
(cherry picked from commit 8d78369)
Signed-off-by: Sébastien Han <[email protected]>
  • Loading branch information
leseb committed Aug 14, 2018
1 parent b7df2c3 commit 7c0cb7d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/daemon/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,7 @@ function mount_lockbox {
mkdir -p /var/lib/ceph/osd-lockbox/"${1}"
mount /dev/disk/by-partuuid/"${2}" /var/lib/ceph/osd-lockbox/"${1}" || true
local ceph_fsid
local cluster_name
cluster_name=$(basename "$(grep -R fsid /etc/ceph/ | grep -oE '^[^.]*')")
ceph_fsid=$(ceph-conf --lookup fsid -c /etc/ceph/"$cluster_name".conf)
ceph_fsid=$(ceph-conf --lookup fsid -c /etc/ceph/"$CLUSTER".conf)
echo "$ceph_fsid" > /var/lib/ceph/osd-lockbox/"${1}"/ceph_fsid
chown "${CHOWN_OPT[@]}" ceph. /var/lib/ceph/osd-lockbox/"${1}"/ceph_fsid
}
Expand Down

0 comments on commit 7c0cb7d

Please sign in to comment.