Project

General

Profile

Feature #3101

allow "ceph osd crush set" without overwriting weight

Added by Anonymous about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Monitor
Target version:
Start date:
09/06/2012
Due date:
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Currently, a ceph-osd coming up gets its weight reset by src/upstart/ceph-osd.conf. This is not good. A node reboot should not override admin decisions about OSD weights.

There should be a way to adjust the OSD location in CRUSH without changing the weight.

Perhaps use a placeholder value like "nochange", "-" or "keep", to signal no change.

Related, why do we need to pass in both name and id?

    ceph \
        --cluster="${cluster:-ceph}" \
        --name="osd.$id" \
        --keyring="/var/lib/ceph/osd/${cluster:-ceph}-$id/keyring" \
        osd crush set \
    -- \
        "$id" "osd.$id" "${weight:-1}" \
    root=default \
...

Associated revisions

Revision b2409a2c (diff)
Added by Sage Weil about 7 years ago

mon: 'osd crush create-or-move <id> <initial-weight> <loc ...>'

Create an item in the tree with the given weight, or move it (without
touching the weight) if it is already present.

Closes: #3101
Signed-off-by: Sage Weil <>

Revision fb6c5c3e (diff)
Added by Tommi Virtanen about 7 years ago

upstart: Use "ceph osd crush create-or-move".

Now the weight is only set when adding the OSD to the CRUSH map for
the first time. Once it's there, it's only moved, and the weight is
left untouched.

Change the ceph.conf option for the initial weight from
osd_crush_weight to osd_crush_initial_weight, to reflect this.

If you don't want new OSDs to store data automatically (to minimize
balancing and keep a human in the control loop), you can now
set osd_crush_initial_weight=0.

Closes: #3101
Signed-off-by: Tommi Virtanen <>

History

#1 Updated by Anonymous about 7 years ago

Sage proposed this would be "ceph osd crush create-or-move".. I think the args could be "ID INITIAL_WEIGHT VAR=VAL.."

Sage, I'm taking back my "why don't we put the mon in charge of initial weight configurability" -- I see the upstart script is already looking at ceph.conf, we might as well use that: $osd_crush_weight. Perhaps we should rename that $osd_crush_initial_weight, though, and change the default embedded in src/upstart/ceph-osd.conf to 0 (and remove $osd_crush_weight).

#2 Updated by Sage Weil about 7 years ago

  • Tracker changed from Bug to Feature

#3 Updated by Sage Weil about 7 years ago

  • Category set to Monitor
  • Status changed from New to Need Review
  • Target version set to v0.53c

#4 Updated by Sage Weil about 7 years ago

  • Assignee set to Sage Weil

#5 Updated by Sage Weil about 7 years ago

  • translation missing: en.field_story_points set to 1
  • translation missing: en.field_position set to 1
  • translation missing: en.field_position changed from 1 to 1394

#6 Updated by Sage Weil about 7 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF