]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: reliably send pg_created messages to the mon 25731/head
authorSage Weil <sage@redhat.com>
Mon, 31 Dec 2018 17:05:03 +0000 (11:05 -0600)
committerSage Weil <sage@redhat.com>
Mon, 31 Dec 2018 17:05:03 +0000 (11:05 -0600)
commite51685548705889fae56ae6dbdf4dca21615da71
tree8c1efa7a80d4dcb37e5e8112ebe3ed010099388b
parent55959be90ad4eba01baa9672cf4522b85c4e02a8
osd: reliably send pg_created messages to the mon

The OSD has to reliably deliver a pg_created message to the mon in order
for the mon to clear the pool's CREATING flag.  Previously, a mon
connection reset would drop the message.

Restructure this to:

- queue a message any time a PG peers and the pool as the CREATING flag
- track pending messages in OSDService
- resend on mon connect
- prune messages for pools that no longer have the CREATING flag

This new strategy can result in resends of these messages to the mon in
cases where the mon already knows the PG was created.  However, pool
creation is rare, and these extra messages are cheap.  And we can avoid
this overhead if we like by limiting the number of PGs that the mon can
create explicitly if we choose (by lowering mon_osd_max_initial_pgs).

Fixes: http://tracker.ceph.com/issues/37775
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc