]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: pass all mon addrs when mapping devices
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 7 Mar 2012 23:12:03 +0000 (15:12 -0800)
committerSage Weil <sage@newdream.net>
Thu, 8 Mar 2012 00:05:14 +0000 (16:05 -0800)
Previously this repeated the address of the first monitor.

Fixes: #2152
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Sage Weil <sage@newdream.net>
src/rbd.cc

index 3f86de6357fe96c0eb3d8fe2765c4387be6720b2..9fffbdf452822ce34990245d1144843dbcabd1c0 100644 (file)
@@ -598,7 +598,7 @@ static int do_kernel_add(const char *poolname, const char *imgname,
 
   map<string, entity_addr_t>::const_iterator it = monmap.mon_addr.begin();
   ostringstream oss;
-  for (size_t i = 0; i < monmap.mon_addr.size(); ++i) {
+  for (size_t i = 0; i < monmap.mon_addr.size(); ++i, ++it) {
     oss << it->second.addr;
     if (i + 1 < monmap.mon_addr.size())
       oss << ",";