]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: read volume metadata file using read_string
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 12 Jul 2022 22:32:54 +0000 (18:32 -0400)
committerKotresh HR <khiremat@redhat.com>
Fri, 16 Sep 2022 07:08:52 +0000 (12:38 +0530)
commit77c91b836b447e3c9d13e65a78fc32acbde9f9e7
tree6fdada4ceae66469a429fd72b34b648d99d76ee7
parent8d3dad42a4c97d4d8efb5b72d97fa39692ccbbe5
mgr/volumes: read volume metadata file using read_string

The read_string method, available in Python 3.2 (we assume Python 3.6 as
our current minimum python versino), supports parsing a provided string
for ini-style configuration parameters. Refactoring the reading of the
config file from cephfs into a simple iterator function and then
providing it to the ConfigParser as a single string, allows us to avoid
using StringIO and  simplifies the refresh function.

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