]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: fix safety/idempotency of {set,rm}-device-class 39735/head
authorSage Weil <sage@newdream.net>
Wed, 24 Feb 2021 20:59:57 +0000 (14:59 -0600)
committerSage Weil <sage@newdream.net>
Sat, 27 Feb 2021 15:12:13 +0000 (09:12 -0600)
commit072b025b8d8d9d2b7d05e992985c3605f10fe375
treeea1d1af332b00bd9c85325b3bb71fde629bbc96f
parente9e1dc3c02bc2ae55fd7c1788cad0c2883ee19e5
mon/OSDMonitor: fix safety/idempotency of {set,rm}-device-class

If the command is resent (e.g., due to network reconnect), the second
instance may find that the pending crush map already has the changes
and not wait for it to commit.

Note that the stderr message will be misleading in this case; that is a
problem with most of our mon commands.  :(

Fixes: https://tracker.ceph.com/issues/49212
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit db6c8f9ab32a7bc0dc8bca94f79812bfb9e7b123)
src/mon/OSDMonitor.cc