]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: write volume metadata with shim class
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 12 Jul 2022 22:33:07 +0000 (18:33 -0400)
committerKotresh HR <khiremat@redhat.com>
Tue, 23 Aug 2022 04:46:50 +0000 (10:16 +0530)
commita767f7123d882aa469383c009cb33ad131cd0962
treec7f390368923b3b0a8a58644660a13a4114dcb4c
parentba8b02e463136180eebd881b7ce76eefffc45a0a
mgr/volumes: write volume metadata with shim class

Add a class that works a bit like a python file object so that we
can simplify the flush function. Providing a file-like object to
the ConfigParser's write function avoids unnecessary copies to
a StringIO object and makes the code easier to read.

With no more uses of StringIO, the StringIO imports are removed.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit d06d8a1f5255b5da9106cd70acc0de99f89d2b96)
src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py