Skip to content

Commit

Permalink
osd: do not default-abort on leaked pg refs
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
  • Loading branch information
gregsfortytwo committed May 26, 2017
1 parent 753231b commit 3300304
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 1 deletion.
5 changes: 5 additions & 0 deletions qa/clusters/extra-client.yaml
Expand Up @@ -7,3 +7,8 @@ openstack:
- volumes: # attached to each instance
count: 3
size: 10 # GB
overrides:
ceph:
conf:
osd:
osd shutdown pgref assert: true
4 changes: 4 additions & 0 deletions qa/clusters/fixed-1.yaml
Expand Up @@ -6,5 +6,9 @@ overrides:
osd crush chooseleaf type: 0
osd pool default pg num: 128
osd pool default pgp num: 128
ceph:
conf:
osd:
osd shutdown pgref assert: true
roles:
- [mon.a, mgr.x, osd.0, osd.1, osd.2, client.0]
5 changes: 5 additions & 0 deletions qa/clusters/fixed-2.yaml
Expand Up @@ -5,3 +5,8 @@ openstack:
- volumes: # attached to each instance
count: 3
size: 10 # GB
overrides:
ceph:
conf:
osd:
osd shutdown pgref assert: true
5 changes: 5 additions & 0 deletions qa/clusters/fixed-3-cephfs.yaml
Expand Up @@ -9,3 +9,8 @@ openstack:
log-rotate:
ceph-mds: 10G
ceph-osd: 10G
overrides:
ceph:
conf:
osd:
osd shutdown pgref assert: true
5 changes: 5 additions & 0 deletions qa/clusters/fixed-3.yaml
Expand Up @@ -6,3 +6,8 @@ openstack:
- volumes: # attached to each instance
count: 3
size: 10 # GB
overrides:
ceph:
conf:
osd:
osd shutdown pgref assert: true
5 changes: 5 additions & 0 deletions qa/clusters/fixed-4.yaml
Expand Up @@ -3,3 +3,8 @@ roles:
- [mon.b, osd.1, osd.5, osd.9, osd.13]
- [mon.c, osd.2, osd.6, osd.10, osd.14]
- [mgr.x, osd.3, osd.7, osd.11, osd.15, client.0]
overrides:
ceph:
conf:
osd:
osd shutdown pgref assert: true
1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -974,6 +974,7 @@ OPTION(osd_recovery_op_warn_multiple, OPT_U32, 16)

// Max time to wait between notifying mon of shutdown and shutting down
OPTION(osd_mon_shutdown_timeout, OPT_DOUBLE, 5)
OPTION(osd_shutdown_pgref_assert, OPT_BOOL, false) // crash if the OSD has stray PG refs on shutdown

OPTION(osd_max_object_size, OPT_U64, 100*1024L*1024L*1024L) // OSD's maximum object size
OPTION(osd_max_object_name_len, OPT_U32, 2048) // max rados object name len
Expand Down
4 changes: 3 additions & 1 deletion src/osd/OSD.cc
Expand Up @@ -3233,7 +3233,9 @@ int OSD::shutdown()
#ifdef PG_DEBUG_REFS
p->second->dump_live_ids();
#endif
ceph_abort();
if (cct->_conf->osd_shutdown_pgref_assert) {
ceph_abort();
}
}
p->second->unlock();
p->second->put("PGMap");
Expand Down

0 comments on commit 3300304

Please sign in to comment.