Skip to contentSkip to conversation

libceph: don't set weight to IN when OSD is destroyed

PATCH In review Ilya Dryomov 2 participants 2 messages Mar 6, 2017 Ceph common code (libceph)

lore
Share & tools
lore

Ilya Dryomov

author maintainer
#0 lore raw

PATCH 1/1 libceph: don't set weight to IN when OSD is destroyed

Since ceph.git 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.

Mirrors ceph.git commit a6009d1039a55e2c77f431662b3d6cc5a8e8e63f.

Fixes 930c53286977 ("libceph: apply new_state before new_up_client on incrementals")
---
 net/ceph/osdmap.c | 1 -
 1 file changed, 1 deletion(-)
net/ceph/osdmap.c +0 -1
index cc22dd282a3e..ffe9e904d4d1 100644
@@ -1379,7 +1379,6 @@ static int decode_new_up_state_weight(void **p, void *end,
 		if ((map->osd_state[osd] & CEPH_OSD_EXISTS) &&
 		    (xorstate & CEPH_OSD_EXISTS)) {
 			pr_info("osd%d does not exist\n", osd);
-			map->osd_weight[osd] = CEPH_OSD_IN;
 			ret = set_primary_affinity(map, osd,
 						   CEPH_OSD_DEFAULT_PRIMARY_AFFINITY);
 			if (ret)
Signature · 1 line
2.4.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ilya Dryomov

Since ceph.git 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.

Quoted 6 lines

Mirrors ceph.git commit a6009d1039a55e2c77f431662b3d6cc5a8e8e63f.

Fixes 930c53286977 ("libceph: apply new_state before new_up_client on incrementals")

---

Quoted 24 lines
 net/ceph/osdmap.c | 1 -
 1 file changed, 1 deletion(-)
net/ceph/osdmap.c +0 -1
index cc22dd282a3e..ffe9e904d4d1 100644
@@ -1379,7 +1379,6 @@ static int decode_new_up_state_weight(void **p, void *end,
 		if ((map->osd_state[osd] & CEPH_OSD_EXISTS) &&
 		    (xorstate & CEPH_OSD_EXISTS)) {
 			pr_info("osd%d does not exist\n", osd);
-			map->osd_weight[osd] = CEPH_OSD_IN;
 			ret = set_primary_affinity(map, osd,
 						   CEPH_OSD_DEFAULT_PRIMARY_AFFINITY);
 			if (ret)
Signature · 6 lines
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html