]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: don't set weight to IN when OSD is destroyed 13884/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 1 Mar 2017 16:19:04 +0000 (17:19 +0100)
committerShinobu Kinjo <shinobu@redhat.com>
Wed, 8 Mar 2017 18:18:18 +0000 (03:18 +0900)
Since commit 4e28f9e63644 ("osd/OSDMap: clear osd_info, osd_xinfo on
osd deletion"), weight is set to IN when OSD is deleted.  This changes
the result of applying an incremental for clients, not just OSDs.
Because CRUSH computations are obviously affected, pre-4e28f9e63644
servers disagree with post-4e28f9e63644 clients on object placement,
resulting in misdirected requests.

Fixes: http://tracker.ceph.com/issues/19119
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit a6009d1039a55e2c77f431662b3d6cc5a8e8e63f)

src/osd/OSDMap.cc

index d2fb34f7fe2d199cbda6f7f23610e40d91edbc3f..166d50fb556d7e776872325411396ee1027f86b8 100644 (file)
@@ -1356,7 +1356,6 @@ int OSDMap::apply_incremental(const Incremental &inc)
       (*osd_uuid)[i->first] = uuid_d();
       osd_info[i->first] = osd_info_t();
       osd_xinfo[i->first] = osd_xinfo_t();
-      osd_weight[i->first] = CEPH_OSD_IN;
       set_primary_affinity(i->first, CEPH_OSD_DEFAULT_PRIMARY_AFFINITY);
       osd_addrs->client_addr[i->first].reset(new entity_addr_t());
       osd_addrs->cluster_addr[i->first].reset(new entity_addr_t());