Bug #6591
closedinit script does not pass alternate configuration file to osd crush create-or-move
0%
Description
This leads to OSDs starting without being added to the CRUSH map. I ran into this bootstrapping a cluster with a name other than 'ceph' and suffered for a while trying to figure out why my pgs were all stuck creating.
root@cephdv1:/etc/init.d# git diff HEAD^^^ ceph
diff --git a/init.d/ceph b/init.d/ceph
index 1760aa7..13af041 100755
--- a/init.d/ceph
++ b/init.d/ceph@ -312,7 +312,9
@ for name in $what; do
get_conf osd_weight "" "osd crush initial weight"
defaultweight="$(do_cmd "df $osd_data/. | tail -1 | awk '{ d= \$2/1073741824 ; r = sp
get_conf osd_keyring "$osd_data/keyring" "keyring"
[ -z "$conf" ] || conf_with_flag="-c $conf"
do_cmd "$BINDIR/ceph \
+ $conf_with_flag \
--name=osd.$id \
--keyring=$osd_keyring \
osd crush create-or-move \
Updated by Sage Weil over 10 years ago
- Assignee set to Sage Weil
- Priority changed from Normal to High
- Source changed from other to Community (user)
Updated by Sage Weil over 10 years ago
- Status changed from New to Fix Under Review
wip-6591 has a sligntly different patch.. $conf_with_flag wasn't defined that I coul dsee so i added -c $conf.. does that work for you?
Updated by Sean Noonan over 10 years ago
Sage Weil wrote:
wip-6591 has a sligntly different patch.. $conf_with_flag wasn't defined that I coul dsee so i added -c $conf.. does that work for you?
[ -z "$conf" ] || conf_with_flag="-c $conf" defines conf_with_flag, though I was depending on the shellism that undefined variables are empty. Either way, as long as a fix gets in, I'm quite happy. Thanks!
Updated by Sage Weil over 10 years ago
- Status changed from Fix Under Review to Resolved