]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: add osd_fast_shutdown option (default true)
authorSage Weil <sage@redhat.com>
Fri, 15 Nov 2019 15:31:50 +0000 (09:31 -0600)
committerSébastien Han <seb@redhat.com>
Tue, 21 Jan 2020 09:11:30 +0000 (10:11 +0100)
commit823359c76f6c94d77f0dc8bbe0b90d8150ff0529
tree51bae28e2223baa28947dc233f476010a4db19ca
parentd9516150d95617c2ded9bbef0f3e9b7d76e3dcee
osd: add osd_fast_shutdown option (default true)

If we get a SIGINT or SIGTERM or are deleted from the OSDMap, do a fast
shutdown by exiting immediately.  This has a few important benefits:

 - We immediately stop responding (binding) to any sockets, which means
   other OSDs will immediately decide we are down (and dead!).  This
   minimizes IO interruption.
 - We avoid the complex "clean" shutdown process, which is historically a
   source of bugs.

In reality, the only purpose of the "clean" shutdown is to try to tear down
everything in memory so we can do memory leak checking with valgrind.  Set
this option to false for valgrind QA runs so we can still do that.

Not that with the new read leases in octopus, we rely on the default
behavior that a ECONNREFUSED is taken to mean that the OSD is fully dead,
so that we don't have to wait for any leases to time out.  This works in
sane environments with normal IP networks, but that behavior could
conceivably be a bad idea if there are some weird network shenanigans
going on.  If osd_fast_fail_on_connection_refused were disabled, then this
fast shutdown procedure might be *worse* than the clean shutdown because
we would have to wait for the heartbeat timeout.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit cf352c3ac0bd87d8b7e0c52ac724f94576ae5aa7)
qa/suites/fs/verify/validater/valgrind.yaml
qa/suites/rados/singleton-flat/valgrind-leaks.yaml
qa/suites/rados/verify/validater/valgrind.yaml
qa/suites/rgw/multisite/valgrind.yaml
qa/suites/rgw/verify/validater/valgrind.yaml
src/common/legacy_config_opts.h
src/common/options.cc
src/osd/OSD.cc
src/vstart.sh