]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not default-abort on leaked pg refs 14597/head
authorGreg Farnum <gfarnum@redhat.com>
Mon, 10 Jul 2017 20:33:26 +0000 (13:33 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Tue, 18 Jul 2017 20:24:35 +0000 (13:24 -0700)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 4caf2df0c380a1281db9509b3feb342705512b58)

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 349439cb331bb8f9d0e28c9e9347f1ae665335ca..107ad8271359751b543f8e379211e9626041e282 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
index 3768607330822f68ec1134f3caf87a984f6d4879..1529378001fc1f9ce67db957e91a5c03bf1f6cd5 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, osd.0, osd.1, osd.2, client.0]
index 861e50919315650b73ab6c7d0f07007a20a28a04..e99283787f4c0a4492790743b24cfc68b6cd0d1c 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
index 499c84c37180bc449eb8cabeb5aabcca15a840eb..c6573b43ee80745c348112678766211466d0b2ae 100644 (file)
@@ -9,3 +9,8 @@ openstack:
 log-rotate:
   ceph-mds: 10G
   ceph-osd: 10G
+overrides:
+  ceph:
+    conf:
+      osd:
+        osd shutdown pgref assert: true
index 8e622d2db946435a883e9a8559dc7b4824e0309e..668e8b374dafb6be17d5d6ef4a7f83bab75f6c7a 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
index 7f051dc1fed4218ee4be0e74f05613a62ccd6ceb..f4e4b76ec87d6bae0fea7befa60901b18396c1c7 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] 
 - [osd.3, osd.7, osd.11, osd.15, client.0] 
+overrides:
+  ceph:
+    conf:
+      osd:
+        osd shutdown pgref assert: true
index 70ee16b433ce39f3bcec7f3279baac2b5a24d73e..3fa77dccc251cad216d8e874af6c171fcaae35b7 100644 (file)
@@ -931,6 +931,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 7ac7396686b20af698c129bdcb20ead47edbc1d0..a8004a5ae4516e83e066606c8d5c568fc1dc7cc7 100644 (file)
@@ -2872,7 +2872,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");