]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: Modify OSD Fast-Shutdown to work safely
authorGabriel BenHanokh <benhanokh@gmail.com>
Mon, 7 Mar 2022 15:16:54 +0000 (17:16 +0200)
committerGabriel BenHanokh <benhanokh@gmail.com>
Mon, 7 Mar 2022 15:40:12 +0000 (17:40 +0200)
commit9b2a64a5f6ea743b2a4f4c2dbd703248d88b2a96
treeec6d6ed0918cab69e300355d1d2393e3a378b02c
parentc0c05efaf32471dce7138a43de5fee82678d51c9
osd: Modify OSD Fast-Shutdown to work safely

quiesce all activities and destage allocations to disk before killing the OSD

    1) keep the old (unsafe) fast-shutdown when we are not using NCB (non null-manager())
    2) skip service.prepare_to_stop() which can take as much as 10 seconds
    3) skip debug options in fast-shutdown
    4) set_state(STATE_STOPPING) which will stop accepting new tasks to this OSD
    5) clear op_shardedwq queues, this is safe since we didn't started processing them
    6) stop timer
    7) drain osd_op_tp (no new items will be added)
    8) now we can safely call umount which will close_db/bluefs and will destage allocation to disk
    9) skip _shutdown_cache() when we are in the middle of a fast-shutdown
    10) increase debug level on fast-shutdown
    11) add option for bluestore_qfsck_on_mount to force scan on mount for all tests
    12) disable fsck-on-umount when running fast-shutdown
    13) add an option to increase debug level at fast-shutdown umount()
    14) set a time limit to fast-shutdown

    15) Bug-Fix BlueStore::pool_statfs don't access db after it was removed
    16) Fix error message for qfsck (error was caused by PR https://github.com/ceph/ceph/pull/44563)

    17) make shutdown-timeout configurable

Fixes: https://tracker.ceph.com/issues/53266
Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
src/common/options/global.yaml.in
src/os/ObjectStore.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/osd/OSD.cc
src/osd/OSD.h