]> 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>
Fri, 16 Sep 2022 07:08:56 +0000 (12:38 +0530)
commit55a82a4edc5309ad4719387e546b77d575628cd5
treeaf06e3ba11c1a8090d7550c6dce1e74b86132f0b
parent77c91b836b447e3c9d13e65a78fc32acbde9f9e7
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