]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/OSDMonitor: fix safety/idempotency of {set,rm}-device-class
authorSage Weil <sage@newdream.net>
Wed, 24 Feb 2021 20:59:57 +0000 (14:59 -0600)
committerSage Weil <sage@newdream.net>
Wed, 24 Feb 2021 20:59:57 +0000 (14:59 -0600)
commitdb6c8f9ab32a7bc0dc8bca94f79812bfb9e7b123
treea152d276050843dfb72ccb6c0aa37dab53b408f9
parent8ebe66f362a752472362193b5ea2950ec61de6eb
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>
src/mon/OSDMonitor.cc