Actions
Bug #5140
closedceph init script failed to determine correct hostname for remote osd
% Done:
0%
Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
When using /etc/init.d/ceph -a start, and if you have osds spread across multi hosts. The init script failed to run correctly.It will put all osds to the first host,and failed to calculate the default weight according to available space for remote osds.
Here is part of the wrong code.
get_conf osd_location "" "osd crush location" get_conf osd_weight "" "osd crush initial weight" #this df command should be run remotely by do_root_cmd, not local defaultweight=`df $osd_data/. | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'` get_conf osd_keyring "$osd_data/keyring" "keyring" $BINDIR/ceph \ --name="osd.$id" \ --keyring="$osd_keyring" \ osd crush create-or-move \ -- \ "$id" \ "${osd_weight:-${defaultweight:-1}}" \ root=default \ #the hostname command should also be run remotely ,otherwise all OSDs will be wrongly put under the first host host="$(hostname -s)" \
Updated by Xiaoxi Chen almost 11 years ago
Fixed committed via pull request:
https://github.com/ceph/ceph/pull/307
Please help me to review it , thanks
Updated by Xiaoxi Chen almost 11 years ago
A new commit has been submitted, thanks
https://github.com/ceph/ceph/pull/307
Actions