Hi,

I've added a few comments inline at 
https://github.com/xiaoxichen/ceph/commit/354c09131a64ac1e1a67c71794d1a3bab8334ca8
 . Could you explain in pseudo code, in the commit message, what upgrade 
strategy you are trying to implement ? 

For testing purposes, I would create border cases (i.e. having a rule with 
ruleid != ruleset) in a script similar to 

   https://github.com/ceph/ceph/blob/firefly/src/test/mon/osd-crush.sh

and then trigger the upgrade and check that it enforces the constraint. 

There is a need for a change near 

   https://github.com/ceph/ceph/blob/master/src/crush/CrushWrapper.cc#L787

so that it does not pick a ruleset different from the ruleid. Maybe that could 
be a first step in the right direction ? I mean, not modifying the existing 
maps yet, just enforcing ruleid == ruleset by changing the code. So that a new 
cluster does not suffer from this inconsistency.

Cheers

-- 
Loïc Dachary, Artisan Logiciel Libre

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to