]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Better handle config file on osd full scenario
authorKotresh HR <khiremat@redhat.com>
Tue, 16 Aug 2022 11:38:16 +0000 (17:08 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 16 Sep 2022 07:11:42 +0000 (12:41 +0530)
commit00f875794d44790ba1036a09dcac84d867436376
tree186f755e915c34fcca7e7d6432849e75000db6a8
parent7189ae8947cded848c9ee5e81377fd797de58cc2
mgr/volumes: Better handle config file on osd full scenario

The 'metadata_mgr.flush()' used to truncate the config file
before flushing the new config data. This could lead to an
empty config file when there is no space to write new config
data. This patch handles this scenario by writing it to
temporary file and rename it to config file. This would
retain the config file without truncating it.

Also, there are bunch of places which wasn't handling
'MetadataMgrException' because of this. Fixed those.

Fixes: https://tracker.ceph.com/issues/55976
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit ec57215d508e6cb5b3a4d84fd6a3a5b0c9b96c71)
src/pybind/mgr/volumes/fs/async_cloner.py
src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py