]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm/schedule: make placement shuffle deterministic
authorSage Weil <sage@newdream.net>
Thu, 22 Apr 2021 22:42:00 +0000 (18:42 -0400)
committerSage Weil <sage@newdream.net>
Thu, 3 Jun 2021 12:36:45 +0000 (07:36 -0500)
commitc1953d525d9ade0b7e7b94353d8bde4c832b0118
tree747e3e69f7c4b746ab9472a498c9095f76ff61b8
parent1400b3822f6979f66b2ceda065c479c82edc4d76
mgr/cephadm/schedule: make placement shuffle deterministic

hash(str) is non-deterministic, probably because it is using the internal
object ID or something and not the string content?

In any case, explicitly hash the string content and use that instead.

Also, sort the input pre-shuffle to ensure that variations in the original
host list ordering don't screw with the result.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit adceaa9b28278601c56a7db1c3f42eaa592ec4d1)
src/pybind/mgr/cephadm/schedule.py