• Ilya Dryomov's avatar
    crush: add chooseleaf_vary_r tunable · e2b149cc
    Ilya Dryomov authored
    The current crush_choose_firstn code will re-use the same 'r' value for
    the recursive call.  That means that if we are hitting a collision or
    rejection for some reason (say, an OSD that is marked out) and need to
    retry, we will keep making the same (bad) choice in that recursive
    selection.
    
    Introduce a tunable that fixes that behavior by incorporating the parent
    'r' value into the recursive starting point, so that a different path
    will be taken in subsequent placement attempts.
    
    Note that this was done from the get-go for the new crush_choose_indep
    algorithm.
    
    This was exposed by a user who was seeing PGs stuck in active+remapped
    after reweight-by-utilization because the up set mapped to a single OSD.
    
    Reflects ceph.git commit a8e6c9fbf88bad056dd05d3eb790e98a5e43451a.
    Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    e2b149cc
mapper.c 18.6 KB