]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: blacklist_add should wait for latest OSD map 12889/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 6 Jan 2017 16:17:10 +0000 (11:17 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 11 Jan 2017 20:46:35 +0000 (15:46 -0500)
This ensures that future operations against the OSDs force
a OSD map update to notice the blacklisted client.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 9242a2e4e1a5a9fcea48d8135b1589493fc28242)

src/librados/RadosClient.cc

index 2300f62058bfbf3096692d378816b13779f9b0ea..e0fc6f507b769109bc3feaed64dd811826e05de5 100644 (file)
@@ -789,6 +789,12 @@ int librados::RadosClient::blacklist_add(const string& client_address,
   cmds.push_back(cmd.str());
   bufferlist inbl;
   int r = mon_command(cmds, inbl, NULL, NULL);
+  if (r < 0) {
+    return r;
+  }
+
+  // ensure we have the latest osd map epoch before proceeding
+  r = wait_for_latest_osdmap();
   return r;
 }