Project

General

Profile

Actions

Bug #5140

closed

ceph init script failed to determine correct hostname for remote osd

Added by Xiaoxi Chen almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% 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)" \

Actions #1

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

Actions #2

Updated by Sage Weil almost 11 years ago

  • Assignee set to Sage Weil
Actions #3

Updated by Sage Weil almost 11 years ago

  • Priority changed from High to Urgent
Actions #4

Updated by Xiaoxi Chen almost 11 years ago

A new commit has been submitted, thanks
https://github.com/ceph/ceph/pull/307

Actions #5

Updated by Sage Weil almost 11 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF