]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/Session: only index osd ids >= 0
authorSage Weil <sage@redhat.com>
Tue, 21 Jan 2020 21:09:01 +0000 (15:09 -0600)
committerSage Weil <sage@redhat.com>
Tue, 21 Jan 2020 21:09:01 +0000 (15:09 -0600)
commitd6f0642b82c5a1caa37b839bc8380aeb0c532143
tree07f9b1d2ccc1c8c5599ad2f6f4730684f66c6310
parent057391854c01c10294c8fe56f4b79973e02b7f17
mon/Session: only index osd ids >= 0

This ensures that get_random_osd_session behaves when it does

    int n = by_osd.rbegin()->first + 1;
    int r = rand() % n;

Fixes: https://tracker.ceph.com/issues/43552
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Session.h