]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not default-abort on leaked pg refs 15214/head
authorGreg Farnum <gfarnum@redhat.com>
Fri, 26 May 2017 05:32:01 +0000 (22:32 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Fri, 26 May 2017 21:43:26 +0000 (14:43 -0700)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
qa/clusters/extra-client.yaml
qa/clusters/fixed-1.yaml
qa/clusters/fixed-2.yaml
qa/clusters/fixed-3-cephfs.yaml
qa/clusters/fixed-3.yaml
qa/clusters/fixed-4.yaml
src/common/config_opts.h
src/osd/OSD.cc

index 2b495374f3d3d785e3bca82ee30a5b2a4e81db2e..33fa505b714082a5a6c68f431bf6bbd5ebf019d8 100644 (file)
@@ -7,3 +7,8 @@ openstack:
 - volumes: # attached to each instance
     count: 3
     size: 10 # GB
+overrides:
+  ceph:
+    conf:
+      osd:
+        osd shutdown pgref assert: true
\ No newline at end of file
index 38725b086428465ee5693585572acf303e0164a0..d8e5898b99f4afacb3625d573a64f9a285e8ec66 100644 (file)
@@ -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]
index 6886d1701b8a90c308a66c367f504fd30113aed7..3b08e287d516584ec4dc30721025611576fa4968 100644 (file)
@@ -5,3 +5,8 @@ openstack:
 - volumes: # attached to each instance
     count: 3
     size: 10 # GB
+overrides:
+  ceph:
+    conf:
+      osd:
+        osd shutdown pgref assert: true
\ No newline at end of file
index 7e2e5f05c7651f9a2fcbeefb69eee3db7aca03bf..2d2112f9f649656beeab237a1f7e37f27b07c952 100644 (file)
@@ -9,3 +9,8 @@ openstack:
 log-rotate:
   ceph-mds: 10G
   ceph-osd: 10G
+overrides:
+  ceph:
+    conf:
+      osd:
+        osd shutdown pgref assert: true
\ No newline at end of file
index 3ed30b94ff082b1088ea5e82fd9a1b8f091fe7aa..cd4f4e8ec2ec902419c43245da85a602698eab32 100644 (file)
@@ -6,3 +6,8 @@ openstack:
 - volumes: # attached to each instance
     count: 3
     size: 10 # GB
+overrides:
+  ceph:
+    conf:
+      osd:
+        osd shutdown pgref assert: true
\ No newline at end of file
index 86eb2c63439ea396b3319cddde019035b2d90838..df767f35710ec53fa001efd2203dc62bcd7ec28f 100644 (file)
@@ -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
\ No newline at end of file
index 13e1a558441cee6456ea289ef4c6754bb581d5c4..fc430e61d8d8c072d2f76963783a8520373c0752 100644 (file)
@@ -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
index 40a7c685875db7fcac836336ca36c25651e20a61..190e98991472d9ff40d067a4d83b17cd006cfdc1 100644 (file)
@@ -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");