]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: blacklist_add should wait for latest OSD map
authorJason Dillaman <dillaman@redhat.com>
Fri, 6 Jan 2017 16:17:10 +0000 (11:17 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 30 Jan 2017 14:20:37 +0000 (09:20 -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 38dcb092dfa8818bb1594a463a6dda0cc432e216..51bc0be3d1bf174449d22573a069f2a972a0f88f 100644 (file)
@@ -758,6 +758,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;
 }