Project

General

Profile

Actions

Bug #6591

closed

init script does not pass alternate configuration file to osd crush create-or-move

Added by Sean Noonan over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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 \

Actions #1

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)
Actions #2

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?

Actions #3

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!

Actions #4

Updated by Sage Weil over 10 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF